时间复杂度为:O(m+n)的解法
二维数组中的查找
http://www.nowcoder.com/questionTerminal/abc3fe2ce8e146608e868a70efebf62e
public class Solution {
public boolean Find(int target, int [][] array) {
boolean flag=false;
int i=array.length-1; //定义左下角的下标
int j=0;
while(i>=0&&j<=array[0].length-1){
if(target==array[i][j]){
return true;
}
if(array[i][j]<target){
j++;
continue;
}
if(array[i][j]>target){
i--;
continue;
}
}
return flag;
}
}