static private int findRoot ( int [ ] [ ] leaders , int n ) {
  if ( leaders [ n ] [ 0 ] == n ) return n ;
  return findRoot ( leaders , leaders [ n ] [ 0 ] ) ;
}

static private int findRoot ( int [ ] [ ] leaders , int n ) { if ( leaders [ n ] [ 0 ] == n ) return n ; return findRoot ( leaders , leaders [ n ] [ 0 ] ) ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)) right: (identifier))) consequence: (return_statement (identifier))) (return_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))))))