Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
题意:给定二叉树,查找最长路径
分类:二叉树
解法1:递归查找左右子树,然后比较出最长即可
原文链接http://blog.youkuaiyun.com/crazy__chen/article/details/47192123
本文介绍了一种通过递归方法寻找二叉树中从根节点到最远叶子节点的最长路径的方法,并提供了一个Java实现示例。
1339

被折叠的 条评论
为什么被折叠?



