摘要:
1 class Solution { 2 public: 3 int minDepth(TreeNode *root) { 4 if (root == nullptr) return 0; 5 if (root->left != nullptr&&root-... 阅读全文
摘要:
recursive 1 #include 2 #include 3 using namespace std; 4 5 struct TreeNode { 6 int val; 7 TreeNode *left; 8 TreeNode *right; 9 ... 阅读全文