▍1. 这个程序是按照离散数学教材上给出的算法写的,是字典序的全排列算法。空间复杂度是O(n),时间复杂度基本上是O(n^2)。缺点是只用于打印并没有储存所有的结果。...
这个程序是按照离散数学教材上给出的算法写的,是字典序的全排列算法。空间复杂度是O(n),时间复杂度基本上是O(n^2)。缺点是只用于打印并没有储存所有的结果。-the procedure is in accordance with the materials on discrete mathematics algorithm is written, is a wholly-lexicographic order algorithm. Space complexity is O (n), is basically time complexity is O (n ^ 2). Only drawback is not for print, and store all the results.