Esempio n. 1
0
        public DiaryTrieNode SetChildCharacter(char character, string source)
        {
            var child = GetChild(character);

            if (child == null)
            {
                child = new DiaryTrieNode(character, Depth + 1);
                Children.Add(child);
            }

            child?.AddSource(source);
            return(child);
        }
Esempio n. 2
0
 public DiaryTrie()
 {
     _root = new DiaryTrieNode('.', 0);
 }