리트코드 (10) 썸네일형 리스트형 [이분탐색] 릿코드 Easy 278 'First Bad Version' (Python) https://leetcode.com/problems/first-bad-version/ First Bad Version - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 원소의 값이 크기 때문에 이분 탐색으로 정답을 찾아야 함 # The isBadVersion API is already defined for you. # @param version, an integer # @return an integer # def isBadVersion(version): cla.. [이분탐색] 릿코드 Easy 704 'Binary Search' (Python) https://leetcode.com/problems/binary-search/ Binary Search - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 이분탐색으로 리스트의 인덱스 찾기 class Solution: def search(self, nums: List[int], target: int) -> int: def binary_search(array,target,start,end): if start>end: return None mid = (start+e.. 이전 1 2 다음