private static void PopulateTrie(Stopwatch sw, TrieNode start, MatchCollection words)
 {
     sw.Start();
     foreach (var item in words)
     {
         start.AddWord(start, item.ToString());
     }
     sw.Stop();
     Console.WriteLine("Time to populate the trie: {0}\n", sw.Elapsed);
 }
 private static void AddWordsForSearchInTrie(Stopwatch sw, TrieNode start, List <string> words)
 {
     sw.Start();
     foreach (var item in words)
     {
         start.AddWord(start, item.ToString());
     }
     sw.Stop();
     Console.WriteLine("Time to populate the trie: {0}\n", sw.Elapsed);
 }
Beispiel #3
0
 private static void PopulateTrie(Stopwatch sw, TrieNode start, MatchCollection words)
 {
     sw.Start();
     foreach (var item in words)
     {
         start.AddWord(start, item.ToString());
     }
     sw.Stop();
     Console.WriteLine("Time to populate the trie: {0}\n", sw.Elapsed);
 }
 private static void AddWordsForSearchInTrie(Stopwatch sw, TrieNode start, List<string> words)
 {
     sw.Start();
     foreach (var item in words)
     {
         start.AddWord(start, item.ToString());
     }
     sw.Stop();
     Console.WriteLine("Time to populate the trie: {0}\n", sw.Elapsed);
 }