[LeetCode] 74. Search a 2D Matrix
Python
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
for i in matrix:
if target in i:
return True
return False
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
for i in matrix:
if target in i:
return True
return False
댓글남기기