Pergunta de entrevista da empresa High-Flyer Quant

implement all permutations of one sequence