Create a function to generate all permutations of a given string.
HardProblem Statement
Create a function to generate all permutations of a given string.
Sample Input
"abc"
Sample Output
[ 'abc', 'acb', 'bac', 'bca', 'cab', 'cba' ]
Limits
Time: 2s · Memory: 256 MB