You are viewing a single comment's thread. Return to all comments →
You are right! I'm sorry.
I think we better make the first IF to be like so
if(head == null or head.next == null) return head;
cmiiw
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 →
You are right! I'm sorry.
I think we better make the first IF to be like so
cmiiw