Mergesort Algorithm
The fundamental operation in this algorithm is merging two sorted lists. Because the lists are sorted, this can be done in one pass through the input, if the output is out in a third list. The basic merging algorithm takes two input arrays A and B, an output array C, and three counters, Aptr, Bptr, Cptr, which are initially set to the beginning of their respective arrays. The smaller of A[Aptr] and B[Bptr] is copied to the next entry in C, and the appropriate counters are advanced. When either input list is exhausted, the remainder of the other list is copied to C.
Usage :
1) Enter the command line, and click on the "Command set?" button.
2) Click on the "Start" button
3) Use the "Faster" and "Slower" buttons to control the speed.
4) Use the "Single Step On/Off" button to toggle the single step mode, and use the "Step" button to go one step in the single step mode.
Parameters :
n number of data
r range of data
p number of processors (upto 10)
m mode
0 - random data
1 - decreasing ordered data