~/boss / the-tower

Dynamic programming (bottom-up)

The Tower

Climb 1 or 2 floors at a time. Count every way to the top.

Loading the fight…

How to beat it

Your last move into a floor came from one floor below or two. So its ways are the two floors below it, added. Start at the bottom and work up: each floor needs only the two before it.

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

More bosses

esc