remove dup from sorted array Python AC