正在加载图片...
红黑树的基本性质 ·Binary Search Tree Each node of the tree now contains the attributes color,key,left, right,and p. 1.Every node is either red or black. 2.The root is black. red-black trees ensure that no such path is more than twice as 3.Every leaf (NIL)is black. long as any other,so that the tree is approximately balanced 4.If a node is red,then both its children are black. 5. For each node,all simple paths from the node to descendant leaves contain the same number of black nodes.红黑树的基本性质 • Binary Search Tree • Each node of the tree now contains the attributes color, key, left, right, and p. red-black trees ensure that no such path is more than twice as long as any other, so that the tree is approximately balanced
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有