Why I can't pass it by this! C++


  • 0
    Y
    class Solution {
    public:
        int maxDepth(TreeNode *root) {
            if(root==nulptr) return 0;
            return 1+max(maxDepth(root->left),maxDepth(root->right));
        }
    };
    

    why?


  • 0
    W

    nullptr not nulptr.......................................................................


Log in to reply
 

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