Pergunta de entrevista da empresa NVIDIA

Write a function to find the repeated elements in an array and their counts.