Simple DFS Solution JAVA
\nclass Solution {\n    public int rangeSumBST(TreeNode root, int low, int high) {\n        int[] res = new int[1];\n        dfs(root, low, high, res);\n       
```\nclass Solution {\n    public int rangeSumBST(TreeNode root, int low, int high) {\n        int[] res = new int[1];\n        dfs(root, low, high, res);\n        return res[0];\n    }\n    private void dfs(TreeNode root, int low, int high, int[] sum){\n        if(root == null) return;\n        if(root.val <= high && root.val >= low) sum[0] += root.val;\n        dfs(root.left, low, high, sum);\n        dfs(root.right, low, high, sum);\n    }\n}\n```
['Depth-First Search', 'Java']