In computer science, a radix tree (also patricia trie or radix trie or compact prefix tree) is a space-optimized trie data structure where each node with only one child is merged with its child. The result is that every internal node has at least two children. Unlike in regular tries, edges can be labeled with sequences of elements as well as single elements. This makes them much more efficient for small sets (especially if the strings are long) and for sets of strings that share long prefixes.
As an optimization, edge labels can be stored in constant size by using two pointers to a string (for the first and last elements).
Note that although the examples in this article show strings as sequences of characters, the type of the string elements can be chosen arbitrarily (for example, as a bit or byte of the string representation when using multibyte character encodings or Unicode).
Read more about Radix Tree: Applications, Operations, History, Comparison To Other Data Structures, Variants
Famous quotes containing the word tree:
“But when the bowels of the earth were sought,
And men her golden entrails did espy,
This mischief then into the world was brought,
This framed the mint which coined our misery.
...
And thus began thexordium of our woes,
The fatal dumb-show of our misery;
Here sprang the tree on which our mischief grows,
The dreary subject of worlds tragedy.”
—Michael Drayton (15631631)