Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public Trie()
 {
     this.root = new Node(false);
 }