摘要:
#include usingnamespace std; voidInsertionSort(int* a,int n); intmain(){ intx[]={2,4,6,8,0,1,3,5,7,9}; InsertionSort(x,10); for(inti=0;i0&... 阅读全文
摘要:
#include usingnamespace std; voidPermutations(char* p,const int k,const int m); intmain(){ chars[]="abcd"; Permutations(s,0,3); return0;} ... 阅读全文
摘要:
折半查找仅适用于排序数组的情况 #include usingnamespace std; intBinarySearch(int* a,const int x,const int n); intmain(){ intx[]={1,2,3,4,5,6,7,8,9,10}; intre... 阅读全文