Remove duplicated elements from sorted array.