Write a function called permutations that takes in a string as a parameter and returns an array of all possible permutations of the characters in the string.
@param {number[]} nums - The array to find permutations for @param {number[][]} ans - The result array to store permutations @param {number} index - The current index ...