public class Solution {

public boolean canJump(int[] nums) {

if(nums==null||nums.length<=1)

return true;

int can = nums.length-1;

for(int i=nums.length-2;i>=0;i--){

if(nums[i]>=can-i)

can= i;

}

if(can==0)

return true;

else

return false;

}

}