// adding list of words to dict-tree public void InsertWords(List <string> wordsToInsert) { foreach (string word in wordsToInsert) { Root.InsertValue(' ', word.ToLower()); } }
// </DictLeaf> // building new tree with given words private DictLeaf BuildTree(List <string> words) { DictLeaf toRet = new DictLeaf(' '); foreach (string word in words) { toRet.InsertValue(' ', word); } return(toRet); }