You are viewing a single comment's thread. Return to all comments →
The code seems to first check if "head.next == null" If head is null, the code is trying to access null.next, which is invalid.
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 →
The code seems to first check if "head.next == null" If head is null, the code is trying to access null.next, which is invalid.