static int findNumberOfTimes ( String str1 , String str2 ) {
  int freq [ ] = new int [ 26 ] ;
  int l1 = str1 . length ( ) ;
  for ( int i = 0 ;
  i < l1 ;
  i ++ ) {
    freq [ str1 . charAt ( i ) - 'a' ] += 1 ;
  }
  int l2 = str2 . length ( ) ;
  int count = Integer . MAX_VALUE ;
  for ( int i = 0 ;
  i < l2 ;
  i ++ ) {
    count = Math . min ( count , freq [ str2 . charAt ( i ) - 'a' ] ) ;
  }
  return count ;
}

static int findNumberOfTimes ( String str1 , String str2 ) { int freq [ ] = new int [ 26 ] ; int l1 = str1 . length ( ) ; for ( int i = 0 ; i < l1 ; i ++ ) { freq [ str1 . charAt ( i ) - ' a ' ] += 1 ; } int l2 = str2 . length ( ) ; int count = Integer . MAX_VALUE ; for ( int i = 0 ; i < l2 ; i ++ ) { count = Math . min ( count , freq [ str2 . charAt ( i ) - ' a ' ] ) ; } return count ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_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)))) (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: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (array_access array: (identifier) index: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal))))))))) (return_statement (identifier))))