【搜索二维矩阵】python刷题记录
R4-二分查找专题 直接二维变一维,然后二分查找就可以了 class Solution:def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:nums[i for row in matrix for i in row]def binfind(the,target):low,high0,len(the)-1while low<high:mid(l…
2025-01-26