Removed dupes in linked list using HashSet.