看官方题解就可

public class Solution {
    public boolean Find(int target, int [][] array) {
        int m = array.length;
        if(m == 0){
            return false;
        }
        int n = array[0].length;
        if(n ==0){
            return false;
        }
        int row = 0;//行下标
        int column = n-1;//列下标
        while( row < m && column >=0){
            if( array[row][column] == target){
                return true;
            }else if (target > array[row][column]){
                ++row;
            }else{
                --column;
            }
        }
        return false;
    }
}