class Solution:
def searchMatrix(self, matrix, target: int) -> bool:
for row in matrix:
for element in row:
if element == target:
return True
return False
leetcode---搜索二维矩阵
最新推荐文章于 2023-06-08 09:41:16 发布