bool find(int* data, int rows, int columns, int number) { if (data == nullptr || rows <= 0 || columns <= 0) return false; bool bfind = false; int row = 0; int column = columns - 1; while (row < rows && column >= 0) { if (data[row * columns + column] > number) --column; else if (data[row * columns + column] < number) ++row; else { bfind = true; break; } } return bfind; }