remove duplicates from sorted array

two poniters