Remove duplicates in singly linked list