Inheritance: ITrie
 private Trie GetWordDictTrie()
 {
     var wordDict = WordDictionary.Instance;
     var trie = new Trie();
     foreach (var wd in wordDict.Trie)
     {
         if (wd.Value > 0)
         {
             trie.Insert(wd.Key, wd.Value);
         }
     }
     return trie;
 }
Exemple #2
0
        private Trie GetTestTrie()
        {
            var trie = new Trie();
            trie.Insert("ann");
            trie.Insert("anders", 5);
            trie.Insert("andy", 10);

            trie.Insert("bill");
            trie.Insert("candy");
            trie.Insert("dove");

            return trie;
        }