mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 02:41:42 +08:00
批量更新数据
This commit is contained in:
@@ -4,31 +4,31 @@
|
||||
|
||||
<p>二叉树 <code>tree</code> 的一棵子树包括 <code>tree</code> 的某个节点和这个节点的所有后代节点。<code>tree</code> 也可以看做它自身的一棵子树。</p>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/28/subtree1-tree.jpg" style="width: 532px; height: 400px;" />
|
||||
<img alt="" src="https://pic.leetcode.cn/1724998676-cATjhe-image.png" style="width: 532px; height: 400px;" />
|
||||
<pre>
|
||||
<strong>输入:</strong>root = [3,4,5,1,2], subRoot = [4,1,2]
|
||||
<strong>输出:</strong>true
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/28/subtree2-tree.jpg" style="width: 502px; height: 458px;" />
|
||||
<img alt="" src="https://pic.leetcode.cn/1724998698-sEJWnq-image.png" style="width: 502px; height: 458px;" />
|
||||
<pre>
|
||||
<strong>输入:</strong>root = [3,4,5,1,2,null,null,null,null,0], subRoot = [4,1,2]
|
||||
<strong>输出:</strong>false
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>root</code> 树上的节点数量范围是 <code>[1, 2000]</code></li>
|
||||
<li><code>subRoot</code> 树上的节点数量范围是 <code>[1, 1000]</code></li>
|
||||
<li><code>-10<sup>4</sup> <= root.val <= 10<sup>4</sup></code></li>
|
||||
<li><code>-10<sup>4</sup> <= subRoot.val <= 10<sup>4</sup></code></li>
|
||||
<li><code>-10<sup>4</sup> <= root.val <= 10<sup>4</sup></code></li>
|
||||
<li><code>-10<sup>4</sup> <= subRoot.val <= 10<sup>4</sup></code></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user