parameters: (self, preorder, inorder)
return_statement: return helper(0, len(inorder)-1)
docstring: :type preorder: List[int]
          :type inorder: List[int]
          :rtype: TreeNode
docstring_summary: :type preorder: List[int]
          :type inorder: List[int]
          :rtype: TreeNode
docstring_tokens: : type preorder : List [ int ] : type inorder : List [ int ] : rtype : TreeNode
function: def buildTree(self, preorder, inorder):
          """
          :type preorder: List[int]
          :type inorder: List[int]
          :rtype: TreeNode
          """
          preorder_iterator = iter(preorder)
          inorder_lookup = {n: i for i, n in enumerate(inorder)}
          
          def helper(start, end):
              if start > end:
                  return None
              
              root_val = next(preorder_iterator)
              root = TreeNode(root_val)
              idx = inorder_lookup[root_val]
              root.left = helper(start, idx-1)
              root.right = helper(idx+1, end)
              return root
  
          return helper(0, len(inorder)-1)
function_tokens: def buildTree ( self , preorder , inorder ) : preorder_iterator = iter ( preorder ) inorder_lookup = { n : i for i , n in enumerate ( inorder ) } def helper ( start , end ) : if start > end : return None root_val = next ( preorder_iterator ) root = TreeNode ( root_val ) idx = inorder_lookup [ root_val ] root . left = helper ( start , idx - 1 ) root . right = helper ( idx + 1 , end ) return root return helper ( 0 , len ( inorder ) - 1 )