Pregunta de entrevista de Lowe's Home Improvement

Find the duplicate value int the array and remove them