Sort Colors
Given an array nums containing only 0, 1, and 2 (representing red, white, blue), sort it in place so all 0s come first, then 1s, then 2s. The interview constraint is a single pass, O(1) space, no counting sort, no library sort.
This is Dijkstra's Dutch National Flag: three pointers (low, mid, high) partition the array as you sweep once.
sortColors([2, 0, 2, 1, 1, 0]); // [0, 0, 1, 1, 2, 2]