2015年4月22日

OJ练习24——T104 Maximum Depth of Binary Tree

摘要: 求二叉树深度。【思路】很简单,二叉树经典。用递归求左树右树的深度,较大值加1即可。【other code】int maxDepth(TreeNode *root) { if(root==NULL) return 0; //if(maxDepth(ro... 阅读全文

posted @ 2015-04-22 22:04 EmmaLi 阅读(85) 评论(0) 推荐(0) 编辑

导航