ByteDance Interview Question

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