any()

코-딩/Leetcode

[leetcode] 74. Search a 2D Matrix (python)

문제 : https://leetcode.com/problems/search-a-2d-matrix/ 난이도 : Medium 풀이1 --- Brute Force class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: for arr in matrix: if target bool: lo, hi = 0, len(matrix) - 1 while lo row[-1]: lo = midRow + 1 else: l, h = 0, len(row) - 1 while l row[mid]: l = mid + 1 else: h = mid - 1 return False '이미 정렬이 되어있는 배열에서 원소를 찾는다!' -> 이진트리를 ..

힞뚜루마뚜루
'any()' 태그의 글 목록