上一页 1 ··· 62 63 64 65 66

2016年5月17日

哈夫曼树

摘要: #include #include #include #include using namespace std; typedef struct Tree { int weight; int parent, lchild, rchild; }Tree, *HuffmanTree; void Select(HuffmanTree HT, int i, int &s1,... 阅读全文

posted @ 2016-05-17 21:07 Kooing 阅读(153) 评论(0) 推荐(0) 编辑

线索化二叉树的相关操作

摘要: #include using namespace std; typedef struct Tree { char data; int lTag, rTag; struct Tree *lchild, *rchild; }Tree; void firstCreateTree(Tree* &T) { char ch; cin >> ch; if... 阅读全文

posted @ 2016-05-17 18:07 Kooing 阅读(237) 评论(0) 推荐(0) 编辑

2016年5月16日

二叉树的基本操作

摘要: #include using namespace std; typedef struct Tree { char data1; struct Tree *lchild, *rchild; }Tree; template struct Node { T data; Node* next; }; template class stack { Node... 阅读全文

posted @ 2016-05-16 22:09 Kooing 阅读(146) 评论(0) 推荐(0) 编辑

我的模板栈

摘要: 1 template 2 struct Node 3 { 4 T data; 5 Node* next; 6 }; 7 8 template 9 class stack 10 { 11 Node* top; 12 public: 13 stack():top(NULL){} 14 void push(T n); 15 T pop... 阅读全文

posted @ 2016-05-16 19:31 Kooing 阅读(111) 评论(0) 推荐(0) 编辑

2016年5月10日

括号计算器

摘要: //这计算器支持括号功能,格式例子3+(3*3)## ,后面打两个#算结束,还有阶乘和次方等功能留给同学们自己完善#include using namespace std; template struct Node {//这个是数据结构模板,char和int都可以用 T data; Node* next; }; template class stack { Node... 阅读全文

posted @ 2016-05-10 21:29 Kooing 阅读(597) 评论(0) 推荐(0) 编辑

上一页 1 ··· 62 63 64 65 66

导航