2013年10月11日

Minimum Depth of Binary Tree

摘要: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.思路:递归 1 int min(int a, int b){ 2 if(a left == NULL && root->right == NULL)11 return 1;12 if(root->left == NULL... 阅读全文

posted @ 2013-10-11 16:22 waruzhi 阅读(172) 评论(0) 推荐(0) 编辑

导航