```
bool canJump(vector<int>& nums) {
vector<bool> results(nums.size(), false);
results[0] = true;
for (int i = 1; i<nums.size(); i++) {
for (int j = 0; j<i; j++) {
if (results[j] && ((j+nums[j]) >= i)) {
results[i] = true;
break;
}
}
}
return results[nums.size()-1];
}
```