[LeetCode] Maximum Depth of N-ary Tree N叉树的最大深度
Posted Grandyang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[LeetCode] Maximum Depth of N-ary Tree N叉树的最大深度相关的知识,希望对你有一定的参考价值。
Given a n-ary 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.
For example, given a 3-ary
tree:
We should return its max depth, which is 3.
Note:
- The depth of the tree is at most
1000
. - The total number of nodes is at most
5000
.
s
以上是关于[LeetCode] Maximum Depth of N-ary Tree N叉树的最大深度的主要内容,如果未能解决你的问题,请参考以下文章
[LeetCode]题解(python):104 Maximum Depth of Binary Tree
LeetCode 104. Maximum Depth of Binary Tree
leetcode:Maximum Depth of Binary Tree
LeetCode104. Maximum Depth of Binary Tree