NVIDIA interview question

Generate all possible permutations of a given string.