leetcode 104. 二叉树的最大深度 递归/层序遍历

1、“见树用递归”web int maxDepth(struct TreeNode* root){ int left, right; if(0 == root) return 0; if(0 == root->left && 0 == root->right) return 1; left = maxDepth(root->left); right
相关文章
相关标签/搜索