C++ Easy, Fast, and Understandable
\nRuntime: 144 ms, faster than 86.30% of C++ online submissions for Range Sum of BST.\nMemory Usage: 41 MB, less than 100.00% of C++ online submissions for Rang
```\nRuntime: 144 ms, faster than 86.30% of C++ online submissions for Range Sum of BST.\nMemory Usage: 41 MB, less than 100.00% of C++ online submissions for Range Sum of BST.\n\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}\n * };\n */\nclass Solution {\npublic:\n    int rangeSumBST(TreeNode* root, int L, int R) {\n        int counter = 0;\n        \n        rangeSum(root, counter, L, R);\n        \n        return counter;\n    }\n    \n    void rangeSum(TreeNode* root, int& counter, int L, int R){\n        \n        if(root->val >= L && root->val <= R){\n            counter += root->val;\n        }\n        if(root->left != NULL){\n            rangeSum(root->left, counter, L, R);\n        }\n        if(root->right != NULL){\n            rangeSum(root->right, counter, L, R);\n        }\n    }\n};\n```
['Recursion', 'C', 'Binary Tree']