Add implementation of permutations with the non-recursion algorithm, which use the dictionary order that simulates next_permution.