學習筆記 c++ (遞歸算法--全排列)

給你一個數組,你把這個數組裏的數的所有排列方式寫列出來。 input {1,2,3} output{1,2,3},{1,3,2},{2,3,1}...... 結果 :     代碼: #include <iostream> using namespace std; void swap(char *q, char *p) {     //交換函數     int temp;     temp = *
相關文章
相關標籤/搜索