@@ -0,0 +1,806 @@
+// 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// Your goal is to reach the last index in the minimum number of jumps.%0A%0A// For example:%0A// Given array A = %5B2,3,1,1,4%5D%0A%0A// The minimum number of jumps to reach the last index is 2. (Jump 1 step from index 0 to 1, then 3 steps to the last index.)%0A%0Apublic class Solution %7B%0A    public int jump(int%5B%5D A) %7B%0A    %09int len = A.length;%0A%0A    %09if(len %3C= 1) return 0;%0A%0A    %09int maxDis = 0;%0A    %09int jumps = 0;%0A    %09int currentDis = 0;%0A%0A    %09for(int i = 0; i %3C len; i++)%7B%0A    %09%09if(i %3E currentDis)%7B%0A    %09%09%09currentDis = maxDis;%0A    %09%09%09jumps++;%0A    %09%09%7D%0A    %09%09maxDis = Math.max(maxDis, A%5Bi%5D + i);%0A    %09%7D%0A%0A    %09return jumps;%0A    %7D%0A%7D

add jump game ii solution