package leetcode;

public class Problem55 {
    public boolean canJump(int[] nums) {
        for (int i = 0; i < nums.length; i++) {
        }
        return false;
    }
    
    public static void main(String[] args) {
        Problem55 prob = new Problem55();
        System.out.println(prob.canJump(new int[]{2,3,1,1,4}));
//        System.out.println(prob.canJump(new int[]{3,2,1,0,4}));
    }
}

@@ -90,47 +90,568 @@
     
-for (int i = 0; i %3C nums.length; i++) %7B
+if (nums.length == 1) %7B%0A            return true;%0A        %7D%0A        for (int i = 0; i %3C nums.length; i++) %7B%0A            if (canJump(nums, i)) %7B%0A                return true;%0A            %7D%0A        %7D%0A        return false;%0A    %7D%0A    %0A    private boolean canJump(int%5B%5D nums, int idx) %7B%0A        int i = idx;%0A        while (i %3C nums.length) %7B%0A            if (nums%5Bi%5D == 0) %7B%0A                return false;%0A            %7D%0A            int val = (nums.length-1) - i - nums%5Bi%5D;%0A            if (val == 0) %7B%0A                return true;%0A            %7D%0A            i += nums%5Bi%5D;
 %0A   
@@ -845,10 +845,8 @@
 ));%0A
-//
     
@@ -901,20 +901,134 @@
 2,1,0,4%7D));%0A
+        System.out.println(prob.canJump(new int%5B%5D%7B2,0%7D));%0A        System.out.println(prob.canJump(new int%5B%5D%7B0%7D));%0A
     %7D%0A%7D%0A

Update problem 55 (still incorrect)