You are viewing a single comment's thread. Return to all comments →
Yes, this would throw error if head is null (or 'None' in Python). That check should be done.
Delete duplicate-value nodes from a sorted linked list
You are viewing a single comment's thread. Return to all comments →
Yes, this would throw error if head is null (or 'None' in Python). That check should be done.