> For the complete documentation index, see [llms.txt](https://chiragjain.gitbook.io/neetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chiragjain.gitbook.io/neetcode/55-jump-game/code.md).

# CODE

```python
class Solution:
    def canJump(self, nums: List[int]) -> bool:
        # Tracks the last position from the right side at which we can reach
        # the last index of array. The new goal becomes that position
        goal = len(nums) - 1
        for i in range(len(nums) - 2, -1, -1):
            if i + nums[i] >= goal:
                goal = i
        return goal == 0
        
```
