Move with a pointer in permutations without hashing.