1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-24 14:28:56 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -1,6 +1,6 @@
<p>定一个二叉树的<meta charset="UTF-8" />&nbsp;<code>root</code>&nbsp;,确定它是否是一个&nbsp;<em>完全二叉树</em>&nbsp;</p>
<p>你一棵二叉树的根节点<meta charset="UTF-8" />&nbsp;<code>root</code> ,请你判断这棵树是否是一棵 <strong>完全二叉树</strong>&nbsp;</p>
<p>在一&nbsp;<strong><a href="https://baike.baidu.com/item/完全二叉树/7773232?fr=aladdin" target="_blank">完全二叉树</a></strong>&nbsp;中,除了最后一个关卡外,所有关卡都是完全填满,并且最后一个关卡中的所有节点都尽可能靠左的。它可以包含<meta charset="UTF-8" />&nbsp;<code>1</code>&nbsp;<meta charset="UTF-8" />&nbsp;<code>2<sup>h</sup></code>&nbsp;节点之间的最后一级 <code>h</code> </p>
<p>在一<strong><a href="https://baike.baidu.com/item/完全二叉树/7773232?fr=aladdin" target="_blank">完全二叉树</a></strong> 中,除了最后一外,所有层都被完全填满,并且最后一中的所有节点都尽可能靠左。最后一层(第 <code>h</code> 层)中可以包含<meta charset="UTF-8" />&nbsp;<code>1</code>&nbsp;<meta charset="UTF-8" />&nbsp;<code>2<sup>h</sup></code> 个节点</p>
<p>&nbsp;</p>
@@ -11,7 +11,7 @@
<pre>
<strong>输入:</strong>root = [1,2,3,4,5,6]
<strong>输出:</strong>true
<strong>解释:</strong>最后一层前的每一层都是满的(即,点值为 {1} 和 {2,3} 的两层),且最后一层中的所有点({4,5,6}尽可能地向左。
<strong>解释:</strong>最后一层前的每一层都是满的(即,点值为 {1} 和 {2,3} 的两层),且最后一层中的所有点({4,5,6})尽可能左。
</pre>
<p><strong>示例 2</strong></p>
@@ -21,7 +21,7 @@
<pre>
<strong>输入:</strong>root = [1,2,3,4,5,null,7]
<strong>输出:</strong>false
<strong>解释:</strong>值为 7 的结点没有尽可能靠向左侧
<strong>解释:</strong>值为 7 的节点不满足条件「节点尽可能靠左」
</pre>
<p>&nbsp;</p>
@@ -29,6 +29,6 @@
<p><strong>提示:</strong></p>
<ul>
<li>的结点数在范围 <meta charset="UTF-8" />&nbsp;<code>[1, 100]</code>&nbsp;内。</li>
<li>中节点数在范围 <code>[1, 100]</code></li>
<li><code>1 &lt;= Node.val &lt;= 1000</code></li>
</ul>