随笔分类 -  排列树

摘要:Meta-Loopless Sorts Background Sorting holds an important place in computer science. Analyzing and implementing various sorting algorithms forms an important part of the education of most comput... 阅读全文
posted @ 2014-06-10 15:22 katago 阅读(291) 评论(0) 推荐(0)
摘要:通过swap方式生成的全排列并不是字典顺序的: #include#include#include#include#includeusing namespace std;int A[20];int cnt;int recur;void perm(int cur, int n, int *A){ recur++; if(cur==n)//empty { ... 阅读全文
posted @ 2014-04-19 14:22 katago 阅读(201) 评论(0) 推荐(0)