From b982b79830e6bd2d84a7556660139855d153661a Mon Sep 17 00:00:00 2001 From: coderwei <916606569@qq.com> Date: Tue, 5 Jul 2022 15:36:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=AC=AC111=E9=A2=98?= =?UTF-8?q?=E4=BA=8C=E5=8F=89=E6=A0=91=E6=9C=80=E5=B0=8F=E6=B7=B1=E5=BA=A6?= =?UTF-8?q?js=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0111.二叉树的最小深度.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0111.二叉树的最小深度.md b/problems/0111.二叉树的最小深度.md index 0137bd15..6378300c 100644 --- a/problems/0111.二叉树的最小深度.md +++ b/problems/0111.二叉树的最小深度.md @@ -372,7 +372,7 @@ var minDepth1 = function(root) { // 到叶子节点 返回 1 if(!root.left && !root.right) return 1; // 只有右节点时 递归右节点 - if(!root.left) return 1 + minDepth(root.right);、 + if(!root.left) return 1 + minDepth(root.right); // 只有左节点时 递归左节点 if(!root.right) return 1 + minDepth(root.left); return Math.min(minDepth(root.left), minDepth(root.right)) + 1;