Pregunta de entrevista de Meta

Programming question - genera rate all permutations