Exemplo n.º 1
0
 public static void driver()
 {
     string[] words = {"this", "is", "was", "tea", "today", "total" };
     PrefixTrie trie = new PrefixTrie();
     foreach (string s in words)
         trie.AddWord(s);
     Console.WriteLine("IsPrefix = {0}", trie.IsPrefix("tot"));
 }
Exemplo n.º 2
0
        public static void driver()
        {
            string[]   words = { "this", "is", "was", "tea", "today", "total" };
            PrefixTrie trie  = new PrefixTrie();

            foreach (string s in words)
            {
                trie.AddWord(s);
            }
            Console.WriteLine("IsPrefix = {0}", trie.IsPrefix("tot"));
        }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     PrefixTrie.driver();
     Console.ReadLine();
 }