挑战程序设计竞赛
xiaofang3a
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
最小堆的数组实现
#include using namespace std; #define Maxn 1010 class heapClass { private: int heap[Maxn],len; public: heapClass():len(0) { } bool isempty(); void push(int x); int pop(); }; void heapClass::p原创 2016-12-25 13:58:22 · 2380 阅读 · 0 评论 -
二叉搜索树的实现
#include using namespace std; //二叉搜索树左儿子的值比当前节点小,右儿子的数值比当前节点大 struct node { int val; node *lchd,*rchd; }; //创建树 node *insert(node *p,int x) { if(p==NULL) { node* q=new node; q->val=x; q->lch原创 2016-12-25 17:23:26 · 367 阅读 · 0 评论
分享