Computer Science, asked by PranayVerma6588, 5 hours ago

Implement merge sort for a two-dimensional array. In case of odd dimension, the first division contains more number of elements than the second one. The complete execution of merge sort arranges the elements in increasing order either moving row-wise or column-wise.For example, let there be a 4×44×4 two dimensional array. The complete process to be implemented is illustrated in Fig. 1. Similarly, Fig. 2 demonstrates the scenario for a 3×33×3 two dimensional array. One has to keep on dividing till a single element is remaining. During merging, first the row elements get sorted in increasing order followed by sorting of elements lying in the same column.Fig.1 - 2D Mergesort on a 4×44×4 two dimensional array.​

Answers

Answered by anshugupta6013
0

Explanation:

In case of odd dimension, the first division contains more number of elements than the second one. The complete execution of merge sort arranges the elements in increasing order either moving row-wise or column-wise. For example, let there be a 4 x 4 two dimensional array.

Similar questions