목록입국심사 (1)
서랍장
binary search 이분 탐색
요새 코테 공부를 다시 매일 한 문제 씩 풀어나가고 있다. 프로그래머스 이분 탐색 문제도 풀면서, while l bool: pass # could be [0, n], [1, n] etc. depends on problem left, right = min(searchSpace), max(searchSpace) while left < right: mid = left + (right - left) // 2 if condition(mid): right = mid else: left = mid..
algorithm
2022. 10. 23. 22:54