Find minimum number of jumps to reach last index (always reachable).
BFS-like greedy: track current level end and farthest reachable. When we pass level end, increment jumps.
- Track jumps=0, curEnd=0, farthest=0
- For i from 0 to n-2
- Update farthest = max(farthest, i+nums[i])
- When i == curEnd: jumps++, curEnd=farthest
- Return jumps
- Time Complexity: O(n)
- Space Complexity: O(1)