Minimum Steps to Reach a Target with Variable Jumps

Asked atGoldman SachsZeta
1Give yourself 5 minutes
2Answer out loud, not in your head
3Then compare with the answer below
0
Stuck? Show a way to structure it+
  1. 01Track current jump boundary and farthest reachable index
  2. 02Scan positions within the boundary
  3. 03Extend farthest using i plus jump
  4. 04Commit a jump at boundary
  5. 05Return failure if the frontier stalls

Reference answer

Then expect these follow-ups

  • How does this differ from Jump Game I?

    Tests: follow-up reasoning

  • Can you reconstruct actual landing indices?

    Tests: implementation extension

Free to read · better with Enzo

Practice this out loud with Enzo

Enzo runs it as a mock interview, pushes back with follow-ups, and grades you on the rubric.

Next question