240. 搜索二维矩阵 II 发表于 2021-12-17 更新于 2022-10-29 分类于 leecode刷题复习 这是文章开头,显示在主页面,详情请点击此处。 1234567class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: for row in matrix: idx = bisect.bisect_left(row,target) if idx>=0 and idx<len(row) and row[idx]==target: return True return False