Jump Game
Learn Jump Game (Greedy Algorithms, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Can You Reach the Last Index? Each array element is the MAXIMUM jump length from that position. Determine if the last index is reachable from index 0. Greedy approach: track the FARTHEST reachable index seen so far as you scan left to right - if you ever reach a position beyond that farthest reach before updating it, you're stuck.