static void minMaxLengthWords ( String input ) {
  int len = input . length ( ) ;
  int si = 0 , ei = 0 ;
  int min_length = len , min_start_index = 0 , max_length = 0 , max_start_index = 0 ;
  while ( ei <= len ) {
    if ( ei < len && input . charAt ( ei ) != ' ' ) {
      ei ++ ;
    }
    else {
      int curr_length = ei - si ;
      if ( curr_length < min_length ) {
        min_length = curr_length ;
        min_start_index = si ;
      }
      if ( curr_length > max_length ) {
        max_length = curr_length ;
        max_start_index = si ;
      }
      ei ++ ;
      si = ei ;
    }
  }
  minWord = input . substring ( min_start_index , min_start_index + min_length ) ;
  maxWord = input . substring ( max_start_index , max_length ) ;
}

static void minMaxLengthWords ( String input ) { int len = input . length ( ) ; int si = 0 , ei = 0 ; int min_length = len , min_start_index = 0 , max_length = 0 , max_start_index = 0 ; while ( ei <= len ) { if ( ei < len && input . charAt ( ei ) != ' ▁ ' ) { ei ++ ; } else { int curr_length = ei - si ; if ( curr_length < min_length ) { min_length = curr_length ; min_start_index = si ; } if ( curr_length > max_length ) { max_length = curr_length ; max_start_index = si ; } ei ++ ; si = ei ; } } minWord = input . substring ( min_start_index , min_start_index + min_length ) ; maxWord = input . substring ( max_start_index , max_length ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)))) consequence: (block (expression_statement (update_expression (identifier)))) alternative: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))))