Question
BST Range Sum
Given the root of a Binary Search Tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high].
Input
User Task
Since this is a functional problem, you do not need to handle input or output. Your task is to complete the function rangeSumBST(), which takes the root node, low and  high integer as the input parameter.

Custom Input
The first line of input contains an integer, N, representing the number of nodes in the tree.
The next line consists of space-separated integers denoting the level order traversal of the tree, where non-negative values represent node values, and -1 indicates a null node.
The third line of the input contains two integers low and high
Note: Once a node is marked as -1, no further information about its children is provided.
Output
Return the sum of values of all nodes with a value greater than and equal to low and lesser than and equal to high.

Custom Output
Example
Input:
6
5 3 6 2 4 -1 7
3 6

Output:
18
Explanation
3 + 4 + 5 + 6 = 18

Input:
10
50 25 75 12 37 62 87 -1 -1 30 -1 60 70
30 61

Output:
177

Online