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---搜索二维矩阵
最新推荐文章于 2025-05-09 18:24:41 发布