You are viewing a single comment's thread. Return to all comments →
It looks like you are comparing only 2 consecutive node values. Shouldn't you be comparing with data in all the nodes of the list?
Did your solution pass all the testcases?
Delete duplicate-value nodes from a sorted linked list
You are viewing a single comment's thread. Return to all comments →
It looks like you are comparing only 2 consecutive node values. Shouldn't you be comparing with data in all the nodes of the list?
Did your solution pass all the testcases?