public static double f ( int k , int j ) {
  if ( j < 0 || j > k ) return 0 ;
  if ( k == 0 && j == 0 ) return 1 ;
  if ( memoo [ k ] [ j ] != 0 ) return memoo [ k ] [ j ] ;
  double ans = f ( k - 1 , j - 1 ) + f ( k - 1 , j ) * ( k - 1 - j ) + f ( k - 1 , j + 1 ) * ( j + 1 ) ;
  ans /= k ;
  return memoo [ k ] [ j ] = ans ;
}

public static double f ( int k , int j ) { if ( j < 0 || j > k ) return 0 ; if ( k == 0 && j == 0 ) return 1 ; if ( memoo [ k ] [ j ] != 0 ) return memoo [ k ] [ j ] ; double ans = f ( k - 1 , j - 1 ) + f ( k - 1 , j ) * ( k - 1 - j ) + f ( k - 1 , j + 1 ) * ( j + 1 ) ; ans /= k ; return memoo [ k ] [ j ] = ans ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))) consequence: (return_statement (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))))) right: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (return_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (identifier)))))