Corteva Agriscience interview question

Generate all permutations of a string