My first Shared Solution
My first time sharing a Solution\nI hope it helps you.\n# Approach\nOnly using Recursion.\n\n# Complexity\n- Time complexity: O(N)\n- Space complexity: O(1)\n# 
# My first time sharing a Solution\nI hope it helps you.\n# Approach\nOnly using Recursion.\n\n# Complexity\n- Time complexity: O(N)\n- Space complexity: O(1)\n# C++ Code\n```\nclass Solution {\npublic:\n    int rangeSumBST(TreeNode* root, int low, int high) {\n        return (in(root->val, low, high) ? root->val : 0)\n                +\n                (root->left != nullptr ? rangeSumBST(root->left, low, high) : 0)\n                +\n                (root->right != nullptr ? rangeSumBST(root->right, low, high) : 0);\n    }\n    bool in(int x, int low, int high){\n        return x >= low && x <= high;\n    }\n};\n```\n\n# Python Code\n```\n class Solution(object):\n    def rangeSumBST(self, root, low, high):\n        num = root.val if root.val >= low and root.val <= high else 0\n        return  num + (self.rangeSumBST(root.right, low, high) if root.right else 0) + (self.rangeSumBST(root.left, low, high) if root.left else 0)\n```
['Python', 'C++']