Search
⌘K

Leetcode 1306. Jump Game III

Given an array and a start index, determine whether you can reach any index with value 0 by repeatedly jumping from index i to i + arr[i] or i - arr[i] without leaving the array. This is a reachability problem on an implicit graph of indices (edges i ↔ i ± arr[i]) that can be solved by exploring reachable indices while avoiding cycles.

Asked at:

Amazon

Amazon


Question Timeline

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

Early October, 2024

Amazon

Amazon

Intern

Jump Game III - Determine if it's possible to reach any index with a value 0

Comments

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