1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 19:18:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/算法题(国内版)/problem (Chinese)/合法二叉搜索树 [legal-binary-search-tree-lcci].html

1 line
498 B
HTML
Raw Normal View History

2022-03-27 20:38:29 +08:00
<p>实现一个函数,检查一棵二叉树是否为二叉搜索树。</p><strong>示例 1:</strong><pre><strong>输入:</strong><br> 2<br> / &#92<br> 1 3<br><strong>输出:</strong> true<br></pre><strong>示例 2:</strong><pre><strong>输入:</strong><br> 5<br> / &#92<br> 1 4<br>  / &#92<br>  3 6<br><strong>输出:</strong> false<br><strong>解释:</strong> 输入为: [5,1,4,null,null,3,6]。<br>  根节点的值为 5 ,但是其右子节点值为 4 。</pre>