Trie
Trie
Introduction

A trie is a data structure for storing a set of strings, representing a rooted tree with characters on the edges.
Each vertex of the tree represents a string - consisting of the sequential запись of all characters on the path from the root to this vertex.
Tree construction
At the beginning, a tree is created from a single vertex (the root of the tree). This vertex represents the empty string.
Let denote the vertex to which we will go along the edge from vertex with character .