随笔分类 -  算法 数据结构

摘要:Trie树,又称字典树,单词查找树或者前缀树,是一种用于快速检索的多叉树结构,如英文字母的字典树是一个26叉树,数字的字典树是一个10叉树。Trie树可以利用字符串的公共前缀来节约存储空间。参考:http://hi.baidu.com/zealot886/item/08ef4cbe791c404ebb0e124f下面是我自己实现的trie树#include #include #include #include using namespace std;#define MAXSIZE 26class TrieNode{public: int freq; char nodechar; TrieNod 阅读全文
posted @ 2014-02-25 10:41 老N 阅读(826) 评论(0) 推荐(0)