@@ -0,0 +1,884 @@
+public class LeetCode0105 %7B%0A%0A    static class TreeNode %7B%0A        int val;%0A        TreeNode left;%0A        TreeNode right;%0A        TreeNode(int x) %7B val = x; %7D%0A    %7D%0A%0A    private int preId;%0A    private int inId;%0A    public TreeNode buildTree(int%5B%5D preorder, int%5B%5D inorder)%0A    %7B%0A        preId = 0;%0A        inId = 0;%0A        return buildTree(preorder, inorder, null);%0A    %7D%0A%0A    private TreeNode buildTree(int%5B%5D preorder, int%5B%5D inorder, TreeNode father)%0A    %7B%0A        if (preId %3E= preorder.length) %7B%0A            return null;%0A        %7D%0A%0A        TreeNode root = new TreeNode(preorder%5BpreId++%5D);%0A%0A        if (inorder%5BinId%5D != root.val) %7B%0A            root.left = buildTree(preorder, inorder, root);%0A        %7D%0A%0A        inId++;%0A%0A        if (father == null %7C%7C inorder%5BinId%5D != father.val) %7B%0A            root.right = buildTree(preorder, inorder, father);%0A        %7D%0A%0A        return root;%0A    %7D%0A%7D%0A

Add LeetCode0105.java