We are given a row and column wise sorted array in which we have to search for a particular key. If found, return the index values else return -1.
For eg:
INPUT:
Array :
1 4 8 10
2 5 9 15
6 16 18 20
11 17 19 23
Key to search: 17
OUTPUT:
Key found at row=3 and column=1
We are given a row and column wise sorted array in which we have to search for a particular key. If found, return the index values else return -1.
For eg:
INPUT:
Array :
1 4 8 10
2 5 9 15
6 16 18 20
11 17 19 23
Key to search: 17
OUTPUT:
Key found at row=3 and column=1