摘要: 1 class Solution { 2 public: 3 int minDepth(TreeNode *root) { 4 if (root == nullptr) return 0; 5 if (root->left != nullptr&&root-... 阅读全文
posted @ 2014-10-29 10:44 Ryan in C++ 阅读(150) 评论(0) 推荐(0) 编辑
摘要: recursive 1 #include 2 #include 3 using namespace std; 4 5 struct TreeNode { 6 int val; 7 TreeNode *left; 8 TreeNode *right; 9 ... 阅读全文
posted @ 2014-10-29 09:37 Ryan in C++ 阅读(204) 评论(0) 推荐(0) 编辑