class Solution {

public boolean canJump(int[] nums) {

int []f = new int[1];

f[0] =0;

return help(nums,0,f);

}

public static boolean help(int[]nums,int c,int[] f)

{

if(c==nums.length-1)

{

f[0] =1;

return true;

}

if(f[0]==1)

return true;

int val = nums[c];

for(int i=1;i<=val;i++)

{

if(f[0]==1)

return true;

return help(nums,(c+i),f);

}

```
return false;
}
```

}