JAVA 代码
class Solution {
public boolean searchArray(int[][] array, int target) {
if(array.length == 0) return false;
int i= 0;
int j = array[0].length - 1;
while(i<array.length && j >= 0){
if(array[i][j] == target){
return true;
}
if(array[i][j] < target) i++;
else j--;
}
return false;
}
}