← ALL NOTES
Linked List

83. Remove Duplicates from Sorted List

Keep one copy of each value. Sorted means duplicates are adjacent, so a single pointer comparing current to current->next does it: when they're equal, unlink the next node (current->next =…

Loading…