摘要: #include <stdio.h>#include <string.h>#define TREELEN 7typedef int Status;typedef char TElemType;typedef struct BiTNode{ TElemType data; struct BiTNode *lchild, *rchild;} BiNode, *BiTree;Status CreateBiTree(char * pPreOrder,char * pInOrder, int nTreeLen,BiTree* biTree){int nLeftLen,nRight 阅读全文
posted @ 2012-04-12 12:56 海冰 阅读(442) 评论(0) 推荐(0)
摘要: 发现自己写程序的问题很多,对着算法实现代码,也花费了不短的时间才把问题搞定,很是郁闷。问题多多。现将代码贴出,以备查询。#include<cctype>#include<cstdlib>#include<cstdio>#include<cstring>typedef struct { unsigned int weight; unsigned int parent, lchild,rchild;}HTNode, *HuffmanTree;typedef char ** HuffmanCode;//find the min value of two 阅读全文
posted @ 2011-06-24 15:11 海冰 阅读(334) 评论(1) 推荐(0)