remove duplicates from sorted array

544ms
612ms