remove duplicated elements from linked list