LetterNode FindOrCreateNextLetterNode(char nextLetter) { if (!this.nextLetter.TryGetValue(nextLetter, out LetterNode next)) { next = new LetterNode(this) { letter = nextLetter.ToString() }; this.nextLetter.Add(nextLetter, next); } return(next); }
internal LetterNode(LetterNode parent = null) { this.parent = parent; }