본문 바로가기 메뉴 바로가기

fruits

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

fruits

검색하기 폼
  • 분류 전체보기 (57)
    • Swift (9)
    • iOS Programming (27)
    • Algorithm (9)
    • CS (8)
    • Music Review (2)
    • Just Chat (1)
    • GitHub (1)
  • 방명록

이것이코딩테스트다 (1)
Python 이진 탐색 템플릿 코드

이진 탐색 유형이 나왔을 때 사용하는 템플릿 코드입니다. 위 코드는 "이것이 코딩테스트다 with 파이썬" 책의 코드를 사용하였습니다. # 이진 탐색 소스코드 구현 (반복문) def binary_search(array, target, start, end): while(start target: end = mid-1 # 중간점의 값보다 타겟 값이 큰 경우 오른쪽을 탐색 else: start = mid + 1 return None n, target = list(map(int, input().split())) array = list(map(int, input().split())) result = binary_search(array, target, 0, n-1) if result == None: print("원소..

Algorithm 2021. 8. 24. 23:49
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • RxSwift
  • 멀티프로세스
  • URLComponents
  • 개발대외활동
  • WKUIDelegate
  • returnKey
  • 부캠
  • 쓰레드
  • OS
  • Swift
  • isNetworkAccessAllowed
  • setBackgroundColor
  • optional
  • cs
  • swiftsoup
  • 슈퍼스칼라
  • rxcocoa
  • 프로세스간통신
  • 스레드
  • 운영체제
  • sharedmemory
  • Xcode
  • webcrawl
  • ios
  • 개발동아리
  • 디프만
  • PHImageRequestOptions
  • 스냅킷
  • PHAsset
  • 프로세스
more
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바