update remove duplicate from sorted array