1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-18 03:26:45 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

更新国内版力扣题目描述变更

This commit is contained in:
2022-05-02 23:42:43 +08:00
parent 74598d1cf8
commit 7ea03594b3
198 changed files with 11378 additions and 11118 deletions

View File

@@ -1,26 +1,26 @@
<p>You are given a binary tree in which each node contains an integer value (which might be positive or negative). Design an algorithm to count the number of paths that sum to a given value. The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes).</p>
<p><strong>Example:</strong><br />
Given the following tree and &nbsp;<code>sum = 22,</code></p>
<pre>
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 2 5 1
</pre>
<p>Output:</p>
<pre>
3
<strong>Explanation: </strong>Paths that have sum 22 are: [5,4,11,2], [5,8,4,5], [4,11,7]</pre>
<p>Note:</p>
<ul>
<li><code>node number &lt;= 10000</code></li>
</ul>
<p>You are given a binary tree in which each node contains an integer value (which might be positive or negative). Design an algorithm to count the number of paths that sum to a given value. The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes).</p>
<p><strong>Example:</strong><br />
Given the following tree and &nbsp;<code>sum = 22,</code></p>
<pre>
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 2 5 1