public boolean Find(int[][] array, int number) {
int find = -1;
for(int i = 0; i < N; i++) {
find = binarySearch(array[i], number, 0, N);
if(find != -1) {
return true; //the element is exist
}
}
return false;//the element is not exist
}
Or you can revise this question it will help you a lot