LeetCode -- Path Sum III分析及实现方法
题目描述:
1
2
3
4
5
6
7
8
9
10
|
You are given a binary tree in which each node contains an integer value. Find 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). The tree has no more than 1,000 nodes and the values are in the range -1,000,000 to 1,000,000. |
给定一个二叉树,遍历过程中收集所有可能路径的和,找出和等于X的路径树。
LeetCode -- Path Sum III分析及实现方法
原文:https://www.cnblogs.com/inasiteraf/p/11474283.html