remove duplicates from sorted list

two pointer