剑指offer(1)二维数组中的查找
public class Solution {
public boolean Find(int target, int [][] array) {
int row = 0;
int col = array[0].length-1;
while(row<array.length && col>-1){
if(array[row][col] == target){
return true;
}else if(array[row][col] > target){
col--;
}else{
row++;
}
}
return false;
}
}