static int minJumps ( int arr [ ] , int l , int h ) {
  if ( h == l ) return 0 ;
  if ( arr [ l ] == 0 ) return Integer . MAX_VALUE ;
  int min = Integer . MAX_VALUE ;
  for ( int i = l + 1 ;
  i <= h && i <= l + arr [ l ] ;
  i ++ ) {
    int jumps = minJumps ( arr , i , h ) ;
    if ( jumps != Integer . MAX_VALUE && jumps + 1 < min ) min = jumps + 1 ;
  }
  return min ;
}

static int minJumps ( int arr [ ] , int l , int h ) { if ( h == l ) return 0 ; if ( arr [ l ] == 0 ) return Integer . MAX_VALUE ; int min = Integer . MAX_VALUE ; for ( int i = l + 1 ; i <= h && i <= l + arr [ l ] ; i ++ ) { int jumps = minJumps ( arr , i , h ) ; if ( jumps != Integer . MAX_VALUE && jumps + 1 < min ) min = jumps + 1 ; } return min ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (return_statement (field_access object: (identifier) field: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))))) (return_statement (identifier))))