Staircase search

is there any particualr optimum method to convert any matrix to row and column wise sorted matrix…?

Hi @nikhilmeena
The most optimal way to sort a matrix column-wise and row-wise is as following :
copy all elements of the matrix into a temp[] array and then sort that array. Now one by one copy the elements of temp[] back to the given matrix.
In this way time complexity comes out to be O(n2log2n). (that is n square multiplied by log n to the base 2)

or is there any inbuilt function to sort an array of int array…?

yes … first you have to include algorithm library then use sort(arr,arr+n) where n is size of array arr.