Can any one points out where is the problems of my codes?This just won'work. thx


  • 0
    G
    enter code hereclass Solution(object):
    def inorderTraversal(self, root):
        """
        :type root: TreeNode
        :rtype: List[int]
        """
        res=[]
        if not root:
            return 
        
        self.inorderTraversal(root.left)
        res.append(root.val)
        self.inorderTraversal(root.right)
        return res

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.