2018年11月29日

顺序表元素分块(左负右正中间零)

摘要: #include void partSort(int arr[],int l,int r) { int p=l,i=l,t,cnt=0; printf("\n负数调在前\n"); for(;i=p;i--) if(arr[i]==0) { t=arr[i];arr[i]=arr[p];arr[p]=t; ... 阅读全文

posted @ 2018-11-29 15:48 ewitt 阅读(177) 评论(0) 推荐(0)

二叉树的基本操作实现,包括二叉搜索树的判断

摘要: #include using namespace std; //定义节点 typedef struct node { struct node *lchild; struct node *rchild; int data; }BiTreeNode, *BiTree; //*BiTree的意思是给 struct node*起了个别名,叫BiTree,故BiTree为... 阅读全文

posted @ 2018-11-29 15:45 ewitt 阅读(215) 评论(0) 推荐(0)

导航