Amazon Interview Question

Sort 2D matrix in O(mnlog(mn))