Add 2 algorithms for generating permutations