def buildTree(self, preorder, inorder):
    '\n\t\t:type preorder: List[int]\n\t\t:type inorder: List[int]\n\t\t:rtype: TreeNode\n\t\t'
    if (not preorder):
        return None

    def build_node(lo, hi):
        node = TreeNode(preorder[self.index])
        self.index += 1
        j = inorder.index(node.val, lo, hi)
        if ((self.index < len(preorder)) and (preorder[self.index] in inorder[lo:j])):
            node.left = build_node(lo, j)
        if ((self.index < len(preorder)) and (preorder[self.index] in inorder[(j + 1):hi])):
            node.right = build_node((j + 1), hi)
        return node
    return build_node(0, len(preorder))
:type preorder: List[int]
:type inorder: List[int]
:rtype: TreeNode
def buildTree(self, preorder, inorder):
    '\n\t\t:type preorder: List[int]\n\t\t:type inorder: List[int]\n\t\t:rtype: TreeNode\n\t\t'
    if (not preorder):
        return None

    def build_node(lo, hi):
        node = TreeNode(preorder[self.index])
        self.index += 1
        j = inorder.index(node.val, lo, hi)
        if ((self.index < len(preorder)) and (preorder[self.index] in inorder[lo:j])):
            node.left = build_node(lo, j)
        if ((self.index < len(preorder)) and (preorder[self.index] in inorder[(j + 1):hi])):
            node.right = build_node((j + 1), hi)
        return node
    return build_node(0, len(preorder))