- You are given a number n, representing the number of rows and columns of a square matrix.
- You are given n * n numbers, representing elements of 2d array a.
- Note- Each row and column is sorted in increasing order.
- You are given a number x.
- You are required to find x in the matrix and print it's location int (row, col) format as discussed in output format below.
- In case element is not found, print "Not Found".
Example 1:
Input:
n=4,
arr = { 11 12 13 14
21 22 23 24
31 32 33 34
41 42 43 44 }
Output: 3 2
Constraints:
1 <= n <= 10^2
-10^9 <= e11, e12, .. n * m elements <= 10^9
All rows and columns are sorted in increasing order