Jump Game III
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
You are given an array arr of non-negative integers and a starting index start. When you stand at index i, you may jump to index i + arr[i] or to index i - arr[i], as long as the destination stays inside the array.
Return true if, starting from start, you can reach **any** index whose value is 0. Otherwise return false.
Examples
Constraints
- 1 <= arr.length <= 5 * 10^4
- 0 <= arr[i] < arr.length
- 0 <= start < arr.length
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.