delete duplicates from sorted array