public static int enumerate ( String source ) {
  byte [ ] counter = new byte [ ] {
    - 1 , 0 , 0 , 0 };
    for ( char ch : source . toCharArray ( ) ) {
      switch ( ch ) {
        case 'n' : counter [ 0 ] ++ ;
        break ;
        case 'i' : counter [ 1 ] ++ ;
        break ;
        case 'e' : counter [ 2 ] ++ ;
        break ;
        case 't' : counter [ 3 ] ++ ;
        break ;
      }
    }
    counter [ 0 ] /= 2 ;
    counter [ 2 ] /= 3 ;
    int min1 = Math . min ( counter [ 0 ] , counter [ 1 ] ) ;
    int min2 = Math . min ( counter [ 2 ] , counter [ 3 ] ) ;
    int min = Math . min ( min1 , min2 ) ;
    return min ;
  }
  
public static int enumerate ( String source ) { byte [ ] counter = new byte [ ] { - 1 , 0 , 0 , 0 } ; for ( char ch : source . toCharArray ( ) ) { switch ( ch ) { case ' n ' : counter [ 0 ] ++ ; break ; case ' i ' : counter [ 1 ] ++ ; break ; case ' e ' : counter [ 2 ] ++ ; break ; case ' t ' : counter [ 3 ] ++ ; break ; } } counter [ 0 ] /= 2 ; counter [ 2 ] /= 3 ; int min1 = Math . min ( counter [ 0 ] , counter [ 1 ] ) ; int min2 = Math . min ( counter [ 2 ] , counter [ 3 ] ) ; int min = Math . min ( min1 , min2 ) ; return min ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions) value: (array_initializer (unary_expression operand: (decimal_integer_literal)) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal))))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (switch_expression condition: (parenthesized_expression (identifier)) body: (switch_block (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (array_access array: (identifier) index: (decimal_integer_literal)))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (array_access array: (identifier) index: (decimal_integer_literal)))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (array_access array: (identifier) index: (decimal_integer_literal)))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (array_access array: (identifier) index: (decimal_integer_literal)))) (break_statement)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)) (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)) (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement (identifier))))