原题链接:https://leetcode.com/problems/minimum-depth-of-binary-tree/
int minDepth(TreeNode* root) {
if (root == NULL) return 0;
int left = minDepth(root->left);
int right = minDepth(root->right);
if (!left || !right) return left + right + 1;
return min(left, right) + 1;
}