利用该二维数组的递增特点,可以从左下角或右上角开始遍历,也就是(len(array)-1,0)或(0,len(array[0]-1))
```#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
#
# @param target int整型
# @param array int整型二维数组
# @return bool布尔型
#
class Solution:
def Find(self , target: int, array: List[List[int]]) -> bool:
i = 0
j = len(array[-1])-1
while i < len(array) and j >= 0:
if target < array[i][j]:
j -= 1
elif target > array[i][j]:
i += 1
else:
return True
return False
# write code here