Merge Sort

Merging

Algorithm

  1. Access the first item from both sequences
  2. While not finished with either sequence
    1. Compare the items from the two sequences

85|46 |23|41
8|5|4|6|2|3|4|1
58 | 46 | 23 | 14
4568 | 1234
12344568