package leetcode;

/**
 * https://leetcode.com/problems/range-sum-of-bst/
 */
public class Problem938 {
    public static class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode(int x) {
            val = x;
        }
    }

    public int rangeSumBST(TreeNode root, int L, int R) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem938 prob = new Problem938();
    }
}

@@ -449,16 +449,838 @@
 m938();%0A
+        TreeNode root = new TreeNode(10);%0A        root.left = new TreeNode(5);%0A        root.left.left = new TreeNode(3);%0A        root.left.right = new TreeNode(7);%0A        root.right = new TreeNode(15);%0A        root.right.right = new TreeNode(18);%0A        System.out.println(prob.rangeSumBST(root, 7, 15)); // 32%0A        System.out.println(prob.rangeSumBST(root, 6, 15)); // 32%0A%0A        root = new TreeNode(10);%0A        root.left = new TreeNode(5);%0A        root.left.left = new TreeNode(3);%0A        root.left.right = new TreeNode(7);%0A        root.right = new TreeNode(15);%0A        root.right.left = new TreeNode(13);%0A        root.right.right = new TreeNode(18);%0A        root.left.left.left = new TreeNode(1);%0A        root.left.right.left = new TreeNode(6);%0A        System.out.println(prob.rangeSumBST(root, 6, 10)); // 23%0A
     %7D%0A%7D%0A

Update problem 938