NVIDIA Interview Question

Generate all possible permutations of a given string.