update simpler solution for `remove dup from sorted array`