mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 22:38:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>实现一个函数,检查一棵二叉树是否为二叉搜索树。</p><strong>示例 1:</strong><pre><strong>输入:</strong><br> 2<br> / \<br> 1 3<br><strong>输出:</strong> true<br></pre><strong>示例 2:</strong><pre><strong>输入:</strong><br> 5<br> / \<br> 1 4<br> / \<br> 3 6<br><strong>输出:</strong> false<br><strong>解释:</strong> 输入为: [5,1,4,null,null,3,6]。<br> 根节点的值为 5 ,但是其右子节点值为 4 。</pre>",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 71,
|
||||
"likes": 73,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"30.3K\", \"totalSubmission\": \"86.1K\", \"totalAcceptedRaw\": 30337, \"totalSubmissionRaw\": 86077, \"acRate\": \"35.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"31.2K\", \"totalSubmission\": \"88.5K\", \"totalAcceptedRaw\": 31216, \"totalSubmissionRaw\": 88482, \"acRate\": \"35.3%\"}",
|
||||
"hints": [
|
||||
"如果使用前序遍历来遍历树,元素的顺序是正确的,这是否表明树实际上是有序的?有重复元素会发生什么?如果允许重复元素,它们必须位于特定的一边(通常是左边)。",
|
||||
"作为一个二叉搜索树,并不是说每个节点都满足left.value <= current.value < right就够了。左边的每个节点必须小于当前节点,该节点还必须小于右边的所有节点。",
|
||||
|
||||
Reference in New Issue
Block a user