Pergunta de entrevista da empresa Accenture

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