Skip to content

Sorting algorithms

↑

Visualize how an algorithm transforms a small input first. Then compare stable ordering, auxiliary storage and worst-case growth rather than relying only on elapsed timing.

  • Insertion sort: Learn the method, test each operation and understand its performance.

  • Merge sort: Learn the method, test each operation and understand its performance.

  • Sorting methods compared: Use the same numbers to compare insertion sort and merge sort.

Start with one concept, work through a small example, and verify your prediction. Follow linked topics when a prerequisite or related idea needs more explanation.