Update 0701.二叉搜索树中的插入操作.md

0701.二叉搜索树中的插入操作.md Python3 **递归法** - 无返回值 有注释 不用Helper function - 删掉无用变量 增加python标志
This commit is contained in:
roylx
2022-10-12 10:38:50 -06:00
committed by GitHub
parent f6db9d06e2
commit abb348dbc4

View File

@ -331,9 +331,8 @@ class Solution:
```
**递归法** - 无返回值 有注释 不用Helper function
```
```python
class Solution:
last = None
def insertIntoBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:
if not root: # for root==None
return TreeNode(val)