~/boss / banana-boss

Binary search on the answer

The Hungry Boss

Find the slowest speed that still clears every pile in 8 hours.

Loading the fight…

How to beat it

Don't try every speed: search them. Test the middle speed and add up the hours, each pile rounded up. Too slow? Every slower speed fails too, so raise the low end. Fits? Every faster speed fits too, so lower the high end and look for slower. When they meet, that's the slowest speed that works.

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/koko-eating-bananas there. Sign in with your email to keep your progress on every device.

More bosses

esc