 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
The
sorting method for each half is done by a
|
|
|
recursive
call to merge sort.
|
|
|
|
– |
That
is why this is a divide and conquer method.
|
|
|
| • |
Mergesort(list,starting
place, ending place)
|
|
|
|
– |
if
the starting place is less than the ending place
|
|
|
|
middle place = (starting + ending) div 2
|
|
|
|
mergesort(list, starting place, middle
place)
|
|
|
|
mergesort(list,middle place+1, ending
place)
|
|
|
|
merge the 2 halves of the list
|
|