Mental Model
We rearrange an array into three parts: smaller than pivot, equal to pivot, and greater than pivot, all in one pass.
Analogy: Imagine sorting colored balls into three bins: red, white, and blue. You pick each ball once and put it in the right bin without extra space.
array: [ 2, 0, 2, 1, 1, 0 ]
indexes: ↑ ↑
low curr high
Three zones:
[ < pivot | == pivot | > pivot ]