摘要:
Number114 最小二叉树深度class Solution {public: int minDepth(TreeNode *root) { int depth=0; if(root==NULL)return 0; int left=minDepth(root->left); int right=minDepth(root->right); if(root->left==NULL&&root->right!=NULL) { depth=right+1; } ... 阅读全文