~/boss / power-sort
Counting sort
The Tally
Sort the whole army without a single comparison.
Loading the fight…
How to beat it
Make one bucket per power level and walk the army once, counting each monster into its bucket. Then write them back: all the 1s, then all the 2s, and so on. No monster is ever compared with another.
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/counting-sort there. Sign in with your email to keep your progress on every device.