You are given a 2 dimensional array of size (\( N \times N \)). Each row and column are sorted in ascending order. How would you find an element in it?
The algorithm works as :
Running time = \( O(N) \). public boolean FindElementIn2DArray(int[][] array, int k, int r, int c){ |