Search
⌘K

Leetcode 1654. Minimum Jumps to Reach Home

Find the minimum number of jumps to reach x using jumps of +a or -b while avoiding forbidden positions and disallowing two consecutive backward jumps; this is a shortest-path problem on an implicit graph requiring BFS over states (position, last-move-was-back) with bounds to prevent infinite exploration.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.