Pregunta de entrevista de Lucid Motors

How to remove the duplicates from a sorted array?