auto commit
This commit is contained in:
@ -981,7 +981,7 @@ public class BinarySearchST<Key extends Comparable<Key>, Value> {
|
||||
|
||||
<div align="center"> <img src="../pics//f9f9f993-8ece-4da7-b848-af9b438fad76.png" width="200"/> </div><br>
|
||||
|
||||
**二叉查找树** (BST)是一颗二叉树,并且每个节点的值都大于其左子树中的所有节点的值而小于右子树的所有节点的值。
|
||||
**二叉查找树** (BST)是一颗二叉树,并且每个节点的值都大于等于其左子树中的所有节点的值而小于等于右子树的所有节点的值。
|
||||
|
||||
<div align="center"> <img src="../pics//8ae4550b-f0cb-4e4d-9e2b-c550538bf230.png" width="200"/> </div><br>
|
||||
|
||||
@ -1125,6 +1125,7 @@ private int rank(Key key, Node x) {
|
||||
|
||||
```java
|
||||
private Node min(Node x) {
|
||||
if (x == null) return null;
|
||||
if (x.left == null) return x;
|
||||
return min(x.left);
|
||||
}
|
||||
|
Reference in New Issue
Block a user