@@ -0,0 +1,657 @@
+/***%0A * Given an array of non-negative integers, you are initially positioned at the first index of the array.%0A *%0A * Each element in the array represents your maximum jump length at that position.%0A *%0A * Determine if you are able to reach the last index.%0A *%0A * For example:%0A * A = %5B2,3,1,1,4%5D, return true.%0A *%0A * A = %5B3,2,1,0,4%5D, return false.%0A */%0Apublic class Solution %7B%0A    // Solution 1: O(n), O(1)%0A    public boolean canJump(int%5B%5D A) %7B%0A        int reach = A%5B0%5D;%0A        for (int i = 1; i %3C A.length && reach %3C A.length - 1; ++i)%0A            if (reach %3E= i)%0A                reach = Math.max(reach, i + A%5Bi%5D);%0A        return reach %3E= A.length - 1;%0A    %7D%0A%7D%0A

add JumpGame.java