摘要:
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!='\... 阅读全文