mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定一个二叉搜索树的 <strong>根节点</strong> <code>root</code> 和一个整数 <code>k</code> , 请判断该二叉搜索树中是否存在两个节点它们的值之和等于 <code>k</code> 。假设二叉搜索树中节点的值均唯一。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入: </strong>root =<strong> </strong>[8,6,10,5,7,9,11], k = 12\n<strong>输出: </strong>true\n<strong>解释: </strong>节点 5 和节点 7 之和等于 12\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入: </strong>root =<strong> </strong>[8,6,10,5,7,9,11], k = 22\n<strong>输出: </strong>false\n<strong>解释: </strong>不存在两个节点值之和为 22 的节点\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>二叉树的节点个数的范围是 <code>[1, 10<sup>4</sup>]</code>.</li>\n\t<li><code>-10<sup>4</sup> <= Node.val <= 10<sup>4</sup></code></li>\n\t<li><code>root</code> 为二叉搜索树</li>\n\t<li><code>-10<sup>5</sup> <= k <= 10<sup>5</sup></code></li>\n</ul>\n\n<p> </p>\n\n<p>注意:本题与主站 653 题相同: <a href=\"https://leetcode-cn.com/problems/two-sum-iv-input-is-a-bst/\">https://leetcode-cn.com/problems/two-sum-iv-input-is-a-bst/</a></p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 22,
|
||||
"likes": 26,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -180,7 +180,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"11.1K\", \"totalSubmission\": \"15.2K\", \"totalAcceptedRaw\": 11102, \"totalSubmissionRaw\": 15218, \"acRate\": \"73.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"13.1K\", \"totalSubmission\": \"17.8K\", \"totalAcceptedRaw\": 13054, \"totalSubmissionRaw\": 17845, \"acRate\": \"73.2%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user