是什么2-3-4-树和红黑树之间的关系 [英] What is the relationship between 2-3-4- Trees and Red-Black Trees
问题描述
在这两种类型的树怎么相同呢?
How are these two types of trees equivalent?
推荐答案
维基百科有这说关于这个问题的。
Wikipedia has this to say on the subject.
2-3-4树木的红 - 黑树的等距的,这意味着它们是 等效的数据结构。换言之,对于每2-3-4树, 存在的至少一个红 - 黑树与数据元素 顺序相同。而且,插入和删除上2-3-4树木操作 这项事业的节点展开,拆分和合并等同于 颜色翻转和红黑树旋转。介绍到 红黑树通常先介绍2-3-4树,因为它们是 概念比较简单。
2-3-4 trees are an isometry of red-black trees, meaning that they are equivalent data structures. In other words, for every 2-3-4 tree, there exists at least one red-black tree with data elements in the same order. Moreover, insertion and deletion operations on 2-3-4 trees that cause node expansions, splits and merges are equivalent to the color-flipping and rotations in red-black trees. Introductions to red-black trees usually introduce 2-3-4 trees first, because they are conceptually simpler.
如果您想更具体的答案,欢迎您来问一个更具体的问题。
If you would like a more specific answer, you are welcome to ask a more specific question.
这篇关于是什么2-3-4-树和红黑树之间的关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!