class Solution {
public boolean searchArray(int[][] array, int target) {
for(int i =0 ; i < array.length - 1 ; i) {
if(array[i][0] == target || target == array[i+1][0]){return true;}
if( array[i][0] < target && target < array[i+1][0]){
for (int j = 1; j <= array[0].length - 1 ; j) {
if(target == array[i][j]){return true;}
}
}
if(array[i+1][0] < target )
{
for (int j = 1; j <= array[0].length - 1; j++) {
if(target == array[i+1][j]){return true;}
}
}
}
return false;
}
}