1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 03:11:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 18:53:53 +08:00
parent c9b1bf36a8
commit 9bc4722a45
349 changed files with 15897 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<p>某公司架构以二叉树形式记录,请返回该公司的层级数。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<p><img alt="" src="https://pic.leetcode.cn/1695101942-FSrxqu-image.png" /></p>
<pre>
<strong>输入:</strong>root = [1, 2, 2, 3, null, null, 5, 4, null, null, 4]
<strong>输出: </strong>4
<strong>解释: </strong>上面示例中的二叉树的最大深度是 4沿着路径 1 -&gt; 2 -&gt; 3 -&gt; 4 或 1 -&gt; 2 -&gt; 5 -&gt; 4 到达叶节点的最长路径上有 4 个节点。
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>节点总数 &lt;= 10000</code></li>
</ul>
<p>注意:本题与主站 104&nbsp;题相同:<a href="https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/">https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/</a></p>
<p>&nbsp;</p>