~/boss / knight-paths
Grid dynamic programming
The Castle Road
Right or down only. Count every road from the knight to the castle.
Loading the fight…
How to beat it
To reach any square, the knight came from the square above or the square on the left. So its roads are those two numbers, added. The top row and left column have one road each. Fill the board row by row and the castle's number is the answer. A monster square counts 0.
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/unique-paths there. Sign in with your email to keep your progress on every device.