You are viewing a single comment's thread. Return to all comments →
SinglyLinkedListNode* removeDuplicates(SinglyLinkedListNode* head) { SinglyLinkedListNode* temp=head; while(temp->next!=NULL){ if(temp->data==temp->next->data){ temp->next=temp->next->next; continue; } temp=temp->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 →