Implement deletion of duplicates from a sorted list.