题解 | #二维数组中的查找#
二维数组中的查找
http://www.nowcoder.com/practice/abc3fe2ce8e146608e868a70efebf62e
public class Solution { public boolean Find(int t, int [][] a) { int x= a.length-1; for(int y=0;y>=0 && y<=a[0].length -1 && x>=0;){ if(a[x][y]==t) return true; else if(a[x][y]<t) y++; else x--; } return false; }
}