Sum of nodes in a Binary Search Tree with values from a given range
Given a Binary Search Tree consisting of n nodes and two positive integers l and r, the task is to find the sum of values of all the nodes that lie in the range [l, r]. Examples: Input: Output: 32Explanation: The nodes in the given Tree that lies in the range [7, 15] are {7, 10, 15}. Therefore, the