mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-11 18:31:41 +08:00
批量更新数据
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
<p>设计一个算法,找出二叉搜索树中指定节点的“下一个”节点(也即中序后继)。</p>
|
||||
<p>设计一个算法,找出二叉搜索树中指定节点的“下一个”节点(也即中序后继)。</p>
|
||||
|
||||
<p>如果指定节点没有对应的“下一个”节点,则返回<code>null</code>。</p>
|
||||
<p>如果指定节点没有对应的“下一个”节点,则返回<code>null</code>。</p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong> root = <code>[2,1,3], p = 1
|
||||
<pre>
|
||||
<strong>输入:</strong>root = <code>[2,1,3], p = 1
|
||||
|
||||
2
|
||||
/ \
|
||||
1 3
|
||||
</code>
|
||||
<strong>输出:</strong> 2</pre>
|
||||
<strong>输出:</strong>2</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong> root = <code>[5,3,6,2,4,null,null,1], p = 6
|
||||
<pre>
|
||||
<strong>输入:</strong>root = <code>[5,3,6,2,4,null,null,1], p = 6
|
||||
|
||||
5
|
||||
/ \
|
||||
@@ -24,4 +26,4 @@
|
||||
/
|
||||
1
|
||||
</code>
|
||||
<strong>输出:</strong> null</pre>
|
||||
<strong>输出:</strong>null</pre>
|
||||
|
Reference in New Issue
Block a user