Qualcomm interview question

Write a function to find all permutations of characters in a given string