摘要: trie树水题#include <iostream> using namespace std; typedef struct node { char data; int count; node * next[26]; node * parent; node() { count=0; memset(next,0,sizeof(next)); } }trie; trie * r; void insert(char * s)//把单词插入trie树中 { if(r==NULL) r=new trie; trie * p=r; int di; while(*s!='\... 阅读全文
posted @ 2012-10-20 16:27 lishimin_come 阅读(122) 评论(0) 推荐(0) 编辑