Concept Flow - Dutch National Flag Three Way Partition
Initialize pointers: low=0, mid=0, high=n-1
Check mid <= high?
No→Done
Yes
Inspect arr[mid
Swap arr[low
mid++
Swap arr[mid
Repeat check mid <= high?
We use three pointers low, mid, and high to partition the array into three parts: 0s, 1s, and 2s by swapping elements and moving pointers until mid passes high.
