':type nums: List[int]
:rtype: TreeNode'

def constructMaximumBinaryTree(self, nums):

    nodeStack = []
    for num in nums:
        node = TreeNode(num)
        while (nodeStack and (num > nodeStack[(-1)].val)):
            node.left = nodeStack[(-1)]
            nodeStack.pop()
        if nodeStack:
            nodeStack[(-1)].right = node
        nodeStack.append(node)
    return nodeStack[0]
