previous
|
index
|
next
Merge Sort
Start with
n
unsorted numbers
Take each pair of adjacent numbers and "merge" them into piles of 2 sorted numbers
Take each pair of piles of 2 sorted numbers and "merge" them into piles of 4 sorted numbers
Take each pair of piles of 4 sorted numbers and "merge" them into piles of 8 sorted numbers
Continue until all
n
numbers are sorted
Example:
6
2
3
8
5
4
1
7
2
6
3
8
4
5
1
7
2
3
6
8
1
4
5
7
1
2
3
4
5
6
7
8
See the algorithm for sorting numbered cards on pages 78-79.
previous
|
index
|
next