Sort Colors - Three Pointers

The Dutch National Flag algorithm uses 33 pointers: low, mid, and high. The idea is to partition the array into three regions as you scan.

1.1. Everything before low is 00 (red).

2.2. Everything between low and mid is 11 (white).

3.3. Everything after high is 22 (blue).

4.4. Everything between mid and high is unprocessed.

You process elements at mid and swap them into the correct region.