Implementation of several algorithms generate all possible permutations.