mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 16:01:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -3,20 +3,20 @@
|
||||
<p>A <strong>valid BST</strong> is defined as follows:</p>
|
||||
|
||||
<ul>
|
||||
<li>The left subtree of a node contains only nodes with keys <strong>less than</strong> the node's key.</li>
|
||||
<li>The left <span data-keyword="subtree">subtree</span> of a node contains only nodes with keys <strong>less than</strong> the node's key.</li>
|
||||
<li>The right subtree of a node contains only nodes with keys <strong>greater than</strong> the node's key.</li>
|
||||
<li>Both the left and right subtrees must also be binary search trees.</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2020/12/01/tree1.jpg" style="width: 302px; height: 182px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> root = [2,1,3]
|
||||
<strong>Output:</strong> true
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2020/12/01/tree2.jpg" style="width: 422px; height: 292px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> root = [5,1,4,null,null,3,6]
|
||||
|
Reference in New Issue
Block a user