NVIDIA Interview Question

Print all permutations of a given string.