Dutch Flags Problem | Algorithms