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); }
public DiaryTrie() { _root = new DiaryTrieNode('.', 0); }