~/boss / three-flags
Dutch national flag (three pointers)
The Color Chaos
Red, white and blue monsters, all mixed up. Sort them in one pass.
Loading the fight…
How to beat it
Three pointers: low, mid and high. Mid walks forward. Red? Swap it to low, and low and mid both step. White? It's already in the middle: mid steps. Blue? Swap it to high and high steps back, but mid stays put: check what came back. When mid passes high, every color is in place.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/sort-colors there. Sign in with your email to keep your progress on every device.