Path Sum Equal To Given Value
1. Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum.Input Format
2. The path does not need to start or end at the root or a leaf,path can start from any where but it must go downwards
Input is managed for you.Output Format
Output is managed for you.Question Video
0 <= Number of Nodes <= 10^5Sample Input
-1000 <= value of Node data <= 1000
10 5 3 3 null null -2 null null 2 null 1 null null -3 null 11 null nullSample Output
8
3
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run