Pregunta de entrevista de Accenture

coding adding the array on numbers and calculating the repeated values in matrix.