前序的一个元素一定是二叉树的根节点。利用这一点,不断将中序数组分成两个数组,分别为左子树和右子树。/* function TreeNode(x) { this.val = x; this.left = null; this.right = null; } */ function reConstructBinaryTree(pre, vin) { // write code here if(!pre.length || !vin.length){ return null } let root = pre[0] let tnode = new TreeNode(root) let index = ...