Remove duplicated element from a sorted array.