Trie or Prefix Tree is an ordered tree data structure, which is usually stored in a Union array with strings as keywords. Different from the binary search tree, there is no node in the tree to store keywords associated with the node. It uses its position in the tree to display its related keywords. All the child nodes of any node have a string prefix associated with the node, and the root is associated with the Null String. Values are usually not associated with each node. Only leaf nodes and some internal nodes are related to the keywords of interest.
The term trie comes from "retrieval." And is pronounced as [TRI] ("Tree"). However, it is usually pronounced as [tra] "try ".
In the following example, keywords are listed in the node, and values are listed below them. Each completed English word has an integer associated with it. Trie can be viewed as a finite state automation. Although the symbols of each boundary usually imply the order of branches.
Keywords do not need to be displayed in the node (in fact, words are only displayed to illustrate how trie is implemented .)
Although it is the most common, tries does not have to use string keywords. The sameAlgorithmIt is easy to implement a similar ordered list, such as replacement of the number list and replacement of the Shape list...
Http://en.wikipedia.org/wiki/Trie