Sort a list by repeatedly picking the next element and inserting it into its correct spot.
Sort a list by splitting it in half, sorting each half, and merging them back together.
Sort a list by picking a pivot, putting smaller elements left and larger right, then recursing.
Combine two sorted arrays into one — the merge step that powers merge sort.
Sort an array containing only 0s, 1s, and 2s in a single pass.