Lucid Motors interview question

How to remove the duplicates from a sorted array?