红黑树是数据结构中的概念, 是一种平衡二叉树. (cut from a book)A Balanced Binary Tree - The Red-Black TreeA binary search tree is a red-black tree if:
1, Every node has a value.
2, Every node is colored either red or black.
3, Every red node that is not a leaf has only black children.
4. Every path from the root to a leaf contains the same number of black nodes.
5, The root node is black.上 google , 查 red-black tree 能查出一堆来.
1, Every node has a value.
2, Every node is colored either red or black.
3, Every red node that is not a leaf has only black children.
4. Every path from the root to a leaf contains the same number of black nodes.
5, The root node is black.上 google , 查 red-black tree 能查出一堆来.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货