static boolean isPalindrome ( int freq [ ] , int k ) {
  int flag = 0 ;
  int length = 0 ;
  for ( int i = 0 ;
  i < 26 ;
  i ++ ) {
    if ( freq [ i ] == 0 ) continue ;
    else if ( freq [ i ] == 1 ) flag = 1 ;
    else {
      if ( freq [ i ] % 2 == 1 ) flag = 1 ;
      length += freq [ i ] / 2 ;
    }
  }
  if ( k % 2 == 1 ) {
    if ( 2 * length + flag >= k ) return true ;
  }
  else {
    if ( 2 * length >= k ) return true ;
  }
  return false ;
}

static boolean isPalindrome ( int freq [ ] , int k ) { int flag = 0 ; int length = 0 ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( freq [ i ] == 0 ) continue ; else if ( freq [ i ] == 1 ) flag = 1 ; else { if ( freq [ i ] % 2 == 1 ) flag = 1 ; length += freq [ i ] / 2 ; } } if ( k % 2 == 1 ) { if ( 2 * length + flag >= k ) return true ; } else { if ( 2 * length >= k ) return true ; } return false ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (continue_statement) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (identifier)) right: (identifier))) consequence: (return_statement (true)))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (identifier))) consequence: (return_statement (true))))) (return_statement (false))))