29.3 Mergesort

We've covered mergesort in the past, but as a reminder, the algorithm is as follows:

  1. Split the items into half.

  2. Mergesort each half.

  3. Merge the two sorted halves to form the final result.

You can see a demo of the algorithm here.

Last updated