Corteva Agriscience Interview Question

Generate all permutations of a string