Pergunta de entrevista da empresa iLeaf Solutions

find duplicates elements and the repeating times in an array without double loops