Two Pointers

Dutch Flag Sort

Given an array of only 0s, 1s, and 2s, sort the array in linear time.

1 / 11

2
2
0
1
2
0
curr: 0high: 5low: 0