Remove duplicated from the sorted array