Pergunta de entrevista da empresa Meta

Programming question - genera rate all permutations