This commit is contained in:
krahets
2023-07-25 16:42:55 +08:00
parent 0760e0865e
commit 902087ec81
23 changed files with 154 additions and 177 deletions

View File

@@ -1448,7 +1448,7 @@ AVL 树的特点在于「旋转 Rotation」操作它能够在不影响二叉
=== "Python"
```python title="avl_tree.py"
def insert(self, val) -> None:
def insert(self, val):
"""插入节点"""
self.root = self.__insert_helper(self.root, val)
@@ -1797,7 +1797,7 @@ AVL 树的特点在于「旋转 Rotation」操作它能够在不影响二叉
=== "Python"
```python title="avl_tree.py"
def remove(self, val: int) -> None:
def remove(self, val: int):
"""删除节点"""
self.root = self.__remove_helper(self.root, val)