solutions for removing duplicates from sorted array

Signed-off-by: Mory Mobile <mory.mobile@gmail.com>