Skip to main content
DevHives

Count Downward Paths With a Given Sum

Loading editor…

3 examples run when you press Run. Submit checks every hidden test too.

Case 1
Input:
[6,2,-3,4,-2,null,9], 6
Expected:
4
Case 2
Input:
[1,-1,1,1,null,-1], 0
Expected:
3
Case 3
Input:
[], 5
Expected:
0
Ready

Run checks your code against the 3 examples. Submit checks it against all 163 tests and needs a free account. You can also try ideas in the free JavaScript or Python compiler.