이진검색
-
[💕 LeetCode Python] 240. Search a 2D Matrix 2Algorithm/1일 1코테 2020. 10. 26. 20:10
✍ 240. Search a 2D Matrix 2 문제 leetcode.com/problems/search-a-2d-matrix-ii/submissions/ Search a 2D Matrix II - 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 내가 쓴 답 def searchMatrix(self, matrix, target): for i in matrix: if target in i: return True return False 풀이 def searchMatr..
-
[💕 LeetCode Python] 704. Binary SearchAlgorithm/1일 1코테 2020. 10. 26. 14:27
리트코드 [ 704. Binary Search ] 문제 및 문제설명 leetcode.com/problems/binary-search/submissions/ 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 내가 제출한 답 def search(self, nums: List[int], target: int) -> int: if any(i == target for i in nums): # target이랑 같은 값이 있으면 return nums..