예제 #1
0
 public void CreateTrie(string[] listWords)
 {
     foreach (string word in listWords)
     {
         simpleTrie.AddWord(word);
     }
 }
예제 #2
0
 public DailyCodingProblem10062018()
 {
     string[] words = { "mantel",
                        "piece",
                        "shelf",
                        "air",
                        "airborne",
                        "born",
                        "this",
                        "is",
                        "a",
                        "add",
                        "addon",
                        "on",
                        "quick",
                        "brown",
                        "the",
                        "fox",
                        "bed",
                        "bath",
                        "bedbath",
                        "beyond",
                        "quicker",
                        "aftereffect",
                        "afternoon",
                        "afterthought",
                        "airbag",
                        "anybody",
                        "how",
                        "any",
                        "anyhow",
                        "anywho",
                        "ever",
                        "however" };
     trie = new SimpleTrie();
     foreach (string word in words)
     {
         trie.AddWord(word);
     }
 }