Frage im Vorstellungsgespräch bei ByteDance

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