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.
This is a non-recursive implementation of Heap's Algorithm that can be used to generate permutations for very large sets of values. Typically recursive solutions generate all sets of values and then ...
Cuireadh roinnt torthaí i bhfolach toisc go bhféadfadh siad a bheith dorochtana duit
Taispeáin torthaí dorochtana