Merge Sort: The Big Picture!

The merge sort applies the divide-and-conquer strategy to sort a sequence:

  1. Divide the sequence into subsequences of singletons. (A singleton sequence consists of one element, and it is considered to be already sorted.)

  2. Successively merge the subsequences pairwise until a single sequence is reformed. Each merge preserves order, so each merged subsequence (and the final merged sequence) are sorted.

Demo
Resources