You are viewing a single comment's thread. Return to all comments →
Recursive solution is nice and neat. Linked lists are often naturally handled recursively:
Node Delete(Node head, int position) { if (position == 0){ return head.next; } head.next = Delete(head.next, position-1); return head; }
Seems like cookies are disabled on this browser, please enable them to open this website
Delete a Node
You are viewing a single comment's thread. Return to all comments →
Recursive solution is nice and neat. Linked lists are often naturally handled recursively: