static int getNth ( Node head , int n ) {
  Node curr = head ;
  for ( int i = 0 ;
  i < n - 1 && curr != null ;
  i ++ ) curr = curr . next ;
  return curr . data ;
}

static int getNth ( Node head , int n ) { Node curr = head ; for ( int i = 0 ; i < n - 1 && curr != null ; i ++ ) curr = curr . next ; return curr . data ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (null_literal))) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))))) (return_statement (field_access object: (identifier) field: (identifier)))))