Upwork interview question

Automation Assignment. Calculating all possible permutations for an array with different characters