Merge sort mxn matrix
As far as I can see, "sort the rows of the matrix, with respect to their columns" means that you're supposed to sort the rows lexicographically. That is, the row
$$a_1\ a_2\ \ldots\ a_n$$
comes before
$$b_1\ b_2\ \ldots\ b_n$$
if and only if there's some $i$ such that $a_j=b_j$ for $j&lt;i$ and $a_i&lt;b_i$.

As far as the divide and conquer goes, it doesn't matter that it's a two-dimensional matrix. You're trying to sort a collection of "things" according to some ordering on "things". These "things" happen to be the rows of some array but that doesn't make any difference to the algorithm.