mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>假设你正在读取一串整数。每隔一段时间,你希望能找出数字 x 的秩(小于或等于 x 的值的个数)。请实现数据结构和算法来支持这些操作,也就是说:</p>\n\n<p>实现 <code>track(int x)</code> 方法,每读入一个数字都会调用该方法;</p>\n\n<p>实现 <code>getRankOfNumber(int x)</code> 方法,返回小于或等于 x 的值的个数。</p>\n\n<p><strong>注意:</strong>本题相对原题稍作改动</p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入:</strong>\n["StreamRank", "getRankOfNumber", "track", "getRankOfNumber"]\n[[], [1], [0], [0]]\n<strong>输出:\n</strong>[null,0,null,1]\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>x <= 50000</code></li>\n\t<li><code>track</code> 和 <code>getRankOfNumber</code> 方法的调用次数均不超过 2000 次</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 29,
|
||||
"likes": 30,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"6.3K\", \"totalSubmission\": \"10.1K\", \"totalAcceptedRaw\": 6256, \"totalSubmissionRaw\": 10061, \"acRate\": \"62.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"6.6K\", \"totalSubmission\": \"10.6K\", \"totalAcceptedRaw\": 6595, \"totalSubmissionRaw\": 10642, \"acRate\": \"62.0%\"}",
|
||||
"hints": [
|
||||
"使用数组存在的问题是插入一个数字会比较慢。我们还能使用其他的数据结构吗?",
|
||||
"二叉搜索树效果好吗?",
|
||||
|
Reference in New Issue
Block a user