@@ -0,0 +1,971 @@
+/**%0A * Definition of SegmentTreeNode:%0A * public class SegmentTreeNode %7B%0A *     public int start, end;%0A *     public SegmentTreeNode left, right;%0A *     public SegmentTreeNode(int start, int end) %7B%0A *         this.start = start, this.end = end;%0A *         this.left = this.right = null;%0A *     %7D%0A * %7D%0A */%0A%0A%0Apublic class Solution %7B%0A    /*%0A     * @param start: start value.%0A     * @param end: end value.%0A     * @return: The root of Segment Tree.%0A     */%0A    public SegmentTreeNode build(int start, int end) %7B%0A        // write your code here%0A        if(start %3E end) %7B  // check core case%0A            return null;%0A        %7D%0A       %0A        SegmentTreeNode root = new SegmentTreeNode(start, end);%0A       %0A        if(start != end) %7B%0A            int mid = (start + end) / 2;%0A            root.left = build(start, mid);%0A            root.right = build(mid+1, end);%0A           %0A            // root.max = Math.max(root.left.max, root.right.max);%0A        %7D%0A        return root;%0A    %7D%0A%7D

add 201