Pregunta de entrevista de ByteDance

Coding question: a sorted array and take out the unique elements.