From abb348dbc4dc6f0081ae313c23c1e3a408dfd818 Mon Sep 17 00:00:00 2001 From: roylx <73628821+roylx@users.noreply.github.com> Date: Wed, 12 Oct 2022 10:38:50 -0600 Subject: [PATCH] =?UTF-8?q?Update=200701.=E4=BA=8C=E5=8F=89=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A0=91=E4=B8=AD=E7=9A=84=E6=8F=92=E5=85=A5=E6=93=8D?= =?UTF-8?q?=E4=BD=9C.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0701.二叉搜索树中的插入操作.md Python3 **递归法** - 无返回值 有注释 不用Helper function - 删掉无用变量 增加python标志 --- problems/0701.二叉搜索树中的插入操作.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/problems/0701.二叉搜索树中的插入操作.md b/problems/0701.二叉搜索树中的插入操作.md index 6a78b2b4..a6f932b0 100644 --- a/problems/0701.二叉搜索树中的插入操作.md +++ b/problems/0701.二叉搜索树中的插入操作.md @@ -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)