Remove dups from string and linked list