1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-09 09:21:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/problem (Chinese)/合法二叉搜索树 [legal-binary-search-tree-lcci].html
2025-01-09 20:29:41 +08:00

23 lines
480 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>实现一个函数,检查一棵二叉树是否为二叉搜索树。</p>
<strong>示例 1</strong>
<pre>
<strong>输入:</strong>
2
/ \
1 3
<strong>输出:</strong>true
</pre>
<strong>示例 2</strong>
<pre>
<strong>输入:</strong>
5
/ \
1 4
&nbsp; / \
&nbsp; 3 6
<strong>输出:</strong>false
<strong>解释:</strong>输入为: [5,1,4,null,null,3,6]。
&nbsp; 根节点的值为 5 ,但是其右子节点值为 4 。</pre>