static void recur ( int idx , Node [ ] graph ) {
  if ( graph [ idx ] . visited ) return ;
  graph [ idx ] . visited = true ;
  for ( int adj : graph [ idx ] . adj ) {
    recur ( adj , graph ) ;
  }
}

static void recur ( int idx , Node [ ] graph ) { if ( graph [ idx ] . visited ) return ; graph [ idx ] . visited = true ; for ( int adj : graph [ idx ] . adj ) { recur ( adj , graph ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) consequence: (return_statement)) (expression_statement (assignment_expression left: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier)) right: (true))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier)) body: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))))))