remove duplicates from sorted list

500ms
652ms
remove duplicates from sorted list II

580ms
616ms