Concept Flow - Sort Colors Two Pointer Dutch Flag
Start: Initialize pointers
low=0, mid=0, high=n-1
Check mid <= high?
No→Done
Yes
Check nums[mid
Swap nums[low
mid++
Swap nums[mid
Repeat Check mid <= high?
We use three pointers low, mid, and high to sort colors in one pass by swapping 0s to front, 2s to end, and 1s stay in middle.
