Remove duplicates from a list ADT with array and linked-list implementation.