Any faster approach than this mlogn apporach


#1

https://ide.geeksforgeeks.org/YxBu2DAjPl

O(mlogn)


#2

There is an O (log m*n) approach. Exploit the fact that the whole matrix is sorted if it were to be unrolled in an array.