Problem 1654 · Medium

Minimum Jumps to Reach Home

Search over (position, last jump was backward) states, since two backward jumps in a row are not allowed.

Open the interactive visualisation