Remove duplicate from sorted array