摘要: #include#include#includeusing namespace std;struct ListNode{ int data; ListNode *lchild,*rchild;};ListNode* Createbst(){ int data; scanf("... 阅读全文
posted @ 2014-08-30 22:00 calmound 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 例如“abc”输出a,b,c,ab,ac,bc,abc#includevoid DFS(char str[],char ss[],int pos,int cnt,int n){ if(n==pos) { ss[cnt]='\0'; if(cnt!=0) pri... 阅读全文
posted @ 2014-08-30 18:23 calmound 阅读(1531) 评论(0) 推荐(0) 编辑
摘要: #includevoid ShellSort(int array[],int length){ int i,j,h,temp; for(h=length/2;h>0;h=h/2) { for(i=h;i=0;j-=h) { ... 阅读全文
posted @ 2014-08-30 17:41 calmound 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #includevoid AdjustMinHeap(int *a,int pos,int len){ int temp,child; for(temp=a[pos];pos*2+1=0;i--) AdjustMinHeap(array,i,len-1); for(i=le... 阅读全文
posted @ 2014-08-30 16:55 calmound 阅读(156) 评论(0) 推荐(0) 编辑