You are viewing a single comment's thread. Return to all comments →
This solution is bad. All it does it rid of repeated runs, but would fail on a linked list like this:
1->2->3->3->3->4->4->5->3->2->1->null
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 →
This solution is bad. All it does it rid of repeated runs, but would fail on a linked list like this:
1->2->3->3->3->4->4->5->3->2->1->null