问题描述
解题思路
实现源码
class Solution {
public:
bool Find(int target, vector<vector<int> > array) {
int row = array.size();
int line = array[0].size();
int i = row - 1;
int j = 0;
while(i >= 0 && j < line) {
if(target == array[i][j])
return true;
else if(target > array[i][j]){
j++;
}
else{
i--;
}
}
return false;
}
};