Generating all possible permutations of N items
One of the simplest methods to generate all possible permutations of N items is Heap's algorithm. This algorithm was proposed by B. R. Heap in 1963, and remains popular until today due to its simplicity. I came across the need to generate permutations for a