Bottom: radix tree radix tree

Bottom: radix tree radix tree

It is an ordered dictionary tree, support fast positioning, insertion and deletion. It is very similar to the trie, if a node has only one child node that can be used in compressed form, on behalf of a path string.

In redis, which stream is used to store the message queue, the message queue for each message ID number is added to the time stamp, with the radix tree will be able to quickly locate a specific ID message according to.

It is also used in a positioning relationship between the groove and the key cluster, in which case node name is a combination of numbers and the key from the slot, it is possible to quickly find the corresponding slot and traverse all key.

Guess you like

Origin www.cnblogs.com/shizhuoping/p/11521939.html