Pregunta de entrevista de IFS

how to find duplicated values from sorted arrays?