private string GetString(Node node) { StringBuilder currentString = new StringBuilder(); foreach (var item in node.NextCharacters.Keys) { currentString.Append(item); } foreach (var item in node.NextCharacters.Keys) { currentString.Append(this.GetString(node.NextCharacters[item])); } return currentString.ToString(); }
public Trie() { this.root = new Node(false); }