博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年11月22日

摘要: View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef int DataType; 4 5 typedef struct BiThrNode{ 6 DataType data; 7 struct BiThrNode *lchild; 8 struct BiThrNode *rchild; 9 unsigned ltag;10 unsigned rtag;11 }BiThrNode,*BiThrTree;12 13 BiThrTree pre;14 15 void InThreading... 阅读全文

posted @ 2012-11-22 10:48 皇星客栈--Linux 阅读(241) 评论(0) 推荐(0) 编辑

摘要: View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<iostream> 4 #define MAXVALUE 100 //定义最大权值 5 #define MAXLEAF 50 //定义哈夫曼树中叶子节点个数 6 #define MAXNODE MAXLEAF*2-1 7 #define MAXBIT 100 //定义哈夫曼编码的最大长度 8 9 typedef struct{10 int weight;11 ... 阅读全文

posted @ 2012-11-22 10:47 皇星客栈--Linux 阅读(222) 评论(0) 推荐(0) 编辑

摘要: View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<iostream> 4 #define MAXVALUE 100 //定义最大权值 5 #define MAXLEAF 50 //定义哈夫曼树中叶子节点个数 6 #define MAXNODE MAXLEAF*2-1 7 8 typedef struct{ 9 int weight;10 int parent;11 int lchild;12 int rchild;13 ... 阅读全文

posted @ 2012-11-22 10:47 皇星客栈--Linux 阅读(195) 评论(0) 推荐(0) 编辑

摘要: View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define MAXNODE 100 4 typedef int status; 5 #define MAX 100 6 7 typedef struct Bitree 8 { 9 struct Bitree *lchild;10 struct Bitree *rchild;11 char data;12 }BiTree ,*BiTnode;13 14 BiTree *Create( )//建立二叉树15 {16 int i,j;17 BiTr... 阅读全文

posted @ 2012-11-22 10:46 皇星客栈--Linux 阅读(169) 评论(0) 推荐(0) 编辑