Adding an in-place permutation algorithm.