1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/彩灯装饰记录 II [cong-shang-dao-xia-da-yin-er-cha-shu-ii-lcof].html
2023-12-09 18:53:53 +08:00

23 lines
836 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>一棵圣诞树记作根节点为 <code>root</code> 的二叉树,节点值为该位置装饰彩灯的颜色编号。请按照从左到右的顺序返回每一层彩灯编号,每一层的结果记录于一行。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<p><img alt="" src="https://pic.leetcode.cn/1694758674-XYrUiV-%E5%89%91%E6%8C%87%20Offer%2032%20-%20I_%E7%A4%BA%E4%BE%8B1.png" /></p>
<pre>
<strong>输入:</strong>root = [8,17,21,18,null,null,6]
<strong>输出:</strong>[[8],[17,21],[18,6]]
</pre>
<p><strong>提示:</strong></p>
<ol>
<li><code>节点总数 &lt;= 1000</code></li>
</ol>
<p>注意:本题与主站 102 题相同:<a href="https://leetcode-cn.com/problems/binary-tree-level-order-traversal/">https://leetcode-cn.com/problems/binary-tree-level-order-traversal/</a></p>
<p>&nbsp;</p>