mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个含重复值的二叉搜索树(BST)的根节点 <code>root</code> ,找出并返回 BST 中的所有 <a href=\"https://baike.baidu.com/item/%E4%BC%97%E6%95%B0/44796\" target=\"_blank\">众数</a>(即,出现频率最高的元素)。</p>\n\n<p>如果树中有不止一个众数,可以按 <strong>任意顺序</strong> 返回。</p>\n\n<p>假定 BST 满足如下定义:</p>\n\n<ul>\n\t<li>结点左子树中所含节点的值 <strong>小于等于</strong> 当前节点的值</li>\n\t<li>结点右子树中所含节点的值 <strong>大于等于</strong> 当前节点的值</li>\n\t<li>左子树和右子树都是二叉搜索树</li>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/03/11/mode-tree.jpg\" style=\"width: 142px; height: 222px;\" />\n<pre>\n<strong>输入:</strong>root = [1,null,2,2]\n<strong>输出:</strong>[2]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>root = [0]\n<strong>输出:</strong>[0]\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>5</sup> <= Node.val <= 10<sup>5</sup></code></li>\n</ul>\n\n<p> </p>\n\n<p><strong>进阶:</strong>你可以不使用额外的空间吗?(假设由递归产生的隐式调用栈的开销不被计算在内)</p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 429,
|
||||
"likes": 447,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Validate Binary Search Tree\", \"titleSlug\": \"validate-binary-search-tree\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u9a8c\\u8bc1\\u4e8c\\u53c9\\u641c\\u7d22\\u6811\"}]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"88.7K\", \"totalSubmission\": \"168.4K\", \"totalAcceptedRaw\": 88724, \"totalSubmissionRaw\": 168404, \"acRate\": \"52.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"94.6K\", \"totalSubmission\": \"178.5K\", \"totalAcceptedRaw\": 94591, \"totalSubmissionRaw\": 178547, \"acRate\": \"53.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user