From 359581e1a3796e6be73f9f079676e312a212dde2 Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Fri, 23 Oct 2026 04:39:45 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Leetcode=20=E9=A2=98=E8=A7=A3=20-=20?= =?UTF-8?q?=E6=A0=91.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- notes/Leetcode 题解 - 树.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notes/Leetcode 题解 - 树.md b/notes/Leetcode 题解 - 树.md index c0243939..1163189f 100644 --- a/notes/Leetcode 题解 - 树.md +++ b/notes/Leetcode 题解 - 树.md @@ -31,12 +31,12 @@ * [5. 二叉树的最近公共祖先](#5-二叉树的最近公共祖先) * [6. 从有序数组中构造二叉查找树](#6-从有序数组中构造二叉查找树) * [7. 根据有序链表构造平衡的二叉查找树](#7-根据有序链表构造平衡的二叉查找树) - * [8. 在二叉查找树中寻找两个节点,使它们的和为一个给定值](#8-在二叉查找树中寻找两个节点,使它们的和为一个给定值) + * [8. 在二叉查找树中寻找两个节点,使它们的和为一个给定值](#8-在二叉查找树中寻找两个节点使它们的和为一个给定值) * [9. 在二叉查找树中查找两个节点之差的最小绝对值](#9-在二叉查找树中查找两个节点之差的最小绝对值) * [10. 寻找二叉查找树中出现次数最多的值](#10-寻找二叉查找树中出现次数最多的值) * [Trie](#trie) * [1. 实现一个 Trie](#1-实现一个-trie) - * [2. 实现一个 Trie,用来求前缀和](#2-实现一个-trie,用来求前缀和) + * [2. 实现一个 Trie,用来求前缀和](#2-实现一个-trie用来求前缀和) @@ -239,7 +239,7 @@ public int pathSum(TreeNode root, int sum) { return ret; } -private int pathSumStartWithRoot(TreeNode root, int sum) { +private int pathSumStartWithRoot(TreeNode root, long sum) { if (root == null) return 0; int ret = 0; if (root.val == sum) ret++; @@ -757,7 +757,7 @@ private int count(TreeNode node) { ### 3. 把二叉查找树每个节点的值都加上比它大的节点的值 -Convert BST to Greater Tree (Easy) +538\. Convert BST to Greater Tree (Easy) [Leetcode](https://leetcode.com/problems/convert-bst-to-greater-tree/description/) / [力扣](https://leetcode-cn.com/problems/convert-bst-to-greater-tree/description/)