Merge Sort on 2D Array

How to apply merge sort on a 2d array? We have to divide it into 4 parts and then merge using sorting rows first and then elements in the respective columns.
Elements with odd no of M X N(size of array), first part will have larger size.

Question Link : https://www.chegg.com/homework-help/questions-and-answers/implement-merge-sort-two-dimensional-array-case-odd-dimension-first-division-contains-numb-q78141749

You can find a C++ solution here https://sapphireengine.com/@/i09ab0