Mental Model
We separate three groups of colors by moving pointers from both ends and swapping elements to put them in the right place.
Analogy: Imagine sorting red, white, and blue balls into three boxes by moving balls from left and right and swapping them until all reds are left, whites in middle, blues right.
[red, white, blue, white, red, blue] ↑left ↑curr ↑right
