python 代码
class Solution(object):
def searchArray(self, array, target):
"""
:type array: List[List[int]]
:type target: int
:rtype: bool
"""
m = len(array)
if m==0:
return False
n = len(array[0])
i, j = 0, n-1
while i<m and j>=0:
if target == array[i][j]:
return True
elif target < array[i][j]:
j-=1
else:
i+=1
return False