提交 c220a9db 编写于 作者: C CyC2018

auto commit

上级 e0f94a02
......@@ -1061,6 +1061,7 @@ floor(key):小于等于键的最大键
- 如果键大于根节点的键,需要先判断右子树中是否存在 floor(key),如果存在就找到,否则根节点就是 floor(key)。
<div align="center"> <img src="../pics//3efca49f-eecf-41fc-83aa-6a4a95e025ea.png" width="400"/> </div><br>
```java
public Key floor(Key key) {
Node x = floor(root, key);
......@@ -1214,7 +1215,7 @@ private void keys(Node x, Queue<Key> queue, Key lo, Key hi) {
2-3 查找树需要用到 2- 节点和 3- 节点,红黑树使用红链接来实现 3- 节点。指向一个节点的链接颜色如果为红色,那么这个节点和上层节点表示的是一个 3- 节点,而黑色则是普通链接。
<div align="center"> <img src="../pics//a46cf05d-e665-4937-a939-a3ab783bc8ee.png" width="800"/> </div><br>
<div align="center"> <img src="../pics//3c99f603-c471-49df-86df-0a0c750f1948.png" width="400"/> </div><br>
红黑树具有以下性质:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册