You are viewing a single comment's thread. Return to all comments →
Super-recursive!
Node RemoveDuplicates(Node head) { if(head == null or head.next == null) return head; Node n = RemoveDuplicates(head.next); if(head.data == n.data) head.next = n.next; return head; }
Seems like cookies are disabled on this browser, please enable them to open this website
Delete duplicate-value nodes from a sorted linked list
You are viewing a single comment's thread. Return to all comments →
Super-recursive!