有人可以准确地解释为什么我们需要在找到字符串的所有排列的算法中撤消交换?
swap((a+i), (a+j)); // Make a[j] the start of this (sub-)permutation starting at i.
permute(a, i+1, n); // Find the permuations of a[i+1..n] - and undo them.
swap((a+i), (a+j)); // Undo the swap of a[i] and a[j].