Mergesort (recursive)

Hide text Hide pseudo-code

Apply recursive mergesort to the following Input array.

Some additional problems.

MERGESORT(array Input; int left; int right)
1 if (left < right)
2   int mid = (right + left) / 2
3   MERGESORT(Input, left, mid)
4   MERGESORT(Input, mid+1, right)
5   Merge Input[left..mid] and Input[mid+1..right] into Auxiliary Table
6   Move Auxiliary Table to Input[left..right]


  Created Wed Jun 20 16:00:42 EEST 2007 - Powered by SVG-hut