Concept Flow - Dutch National Flag Three Way Partition
Start: low=0, mid=0, high=n-1
Check mid <= high?
No→Done
Yes
Check arr[mid
Swap arr[low
mid++
Swap arr[mid
Check mid <= high?
The algorithm uses three pointers low, mid, and high to partition the array into three parts: less than pivot, equal to pivot, and greater than pivot, by swapping elements and moving pointers until mid passes high.
