Algorithm to generate all possible permutations of a list? - Stack ... Say I have a list of n elements, I know there are n! possible ways to order these ... Basically, for each element from left to right, you generate all the permutations of ...