Domanda di colloquio di ByteDance

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