static void Main(string[] args) { var trie = new MyTrie <int>(); trie.Add("hello", 50); trie.Add("hell", 100); trie.Add("peace", 200); trie.Add("peacefull", 50); trie.Remove("hell"); Search(trie, "hello"); Search(trie, "hell"); Search(trie, "peace"); Search(trie, "peacefull"); Console.ReadLine(); }
public WordsInCrossword() { var words = System.IO.File.ReadAllLines("Assets/5000.txt"); var fiveKWords = new HashSet <string>(); foreach (var word in words) { if (!fiveKWords.Contains(word)) { try { trie5kWords.Add(word); fiveKWords.Add(word); } catch (Exception) { continue; } } } }