added remove function to remove duplicates from linked list
added remove function to remove duplicates from linked list without 'extra buffer'