Inverting Permutations In Place