You are viewing a single comment's thread. Return to all comments →
delete current->next; current->next=current->next->next;
How is this working? When current->next has been deleted, how is current->next->next accessible? Shouldn't it give Segmentation fault?
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 →
How is this working? When current->next has been deleted, how is current->next->next accessible? Shouldn't it give Segmentation fault?