From 4418a35b6b516cb506c16cfc10cc9631da34e2b4 Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Fri, 30 Oct 2026 20:18:06 +0800 Subject: [PATCH] =?UTF-8?q?Update=2054.=20=E4=BA=8C=E5=8F=89=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E6=A0=91=E7=9A=84=E7=AC=AC=20K=20=E4=B8=AA=E7=BB=93?= =?UTF-8?q?=E7=82=B9.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新二叉查找树的第 K 个结点代码实现,在遍历前补充成员变量 count 的重置处理。 --- notes/54. 二叉查找树的第 K 个结点.md | 1 + 1 file changed, 1 insertion(+) diff --git a/notes/54. 二叉查找树的第 K 个结点.md b/notes/54. 二叉查找树的第 K 个结点.md index b721f135..46edafd2 100644 --- a/notes/54. 二叉查找树的第 K 个结点.md +++ b/notes/54. 二叉查找树的第 K 个结点.md @@ -15,6 +15,7 @@ private int val; private int count = 0; public int findTargetNode(TreeNode root, int cnt) { + count = 0; inOrder(root, cnt); return val; }