Remove duplicates from linkedlist