<awangdev>Jump Game II_3.java
public int jump(int[] nums) {
        if (nums == null || nums.length == 0) {
            return 0;
        }
        int n = nums.length;
        int start = 0, end = 0, steps = 0;
        while (end < n - 1) {
            steps++; 
            int farthest = 0;
            for (int i = start; i <= end; i++) {
                farthest = Math.max(farthest, i + nums[i]);
                if (farthest >= n - 1) {
                    return steps;
                }
            }
            start = end + 1;
            end = farthest;
        }
        return 0;  
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  int var_4 = var_0 . length ;
  int var_5 = 0 , var_6 = 0 , var_7 = 0 ;
  while ( var_6 < var_4 - 1 ) {
    var_7 ++ ;
    int var_9 = 0 ;
    for ( int var_10 = var_5 ;
    var_10 <= var_6 ;
    var_10 ++ ) {
      var_9 = Math . max ( var_9 , var_10 + var_0 [ var_10 ] ) ;
      if ( var_9 >= var_4 - 1 ) {
        return var_7 ;
      }
    }
    var_5 = var_6 + 1 ;
    var_6 = var_9 ;
  }
  return 0 ;
}
