1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 21:46:46 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给你一个整数数组 <code>citations</code> ,其中 <code>citations[i]</code> 表示研究者的第 <code>i</code> 篇论文被引用的次数,<code>citations</code> 已经按照 <strong>升序排列 </strong>。计算并返回该研究者的 <strong><code>h</code><em> </em>指数</strong>。</p>\n\n<p><a href=\"https://baike.baidu.com/item/h-index/3991452?fr=aladdin\" target=\"_blank\">h 指数的定义</a>h 代表“高引用次数”high citations一名科研人员的 h 指数是指他(她)的 <code>n</code> 篇论文中)<strong>总共</strong>有 <code>h</code> 篇论文分别被引用了<strong>至少</strong> <code>h</code> 次。且其余的 <em><code>n - h</code> </em>篇论文每篇被引用次数 <strong>不超过 </strong><em><code>h</code> </em>次。</p>\n\n<p><strong>提示:</strong>如果 <code>h</code><em> </em>有多种可能的值,<strong><code>h</code> 指数 </strong>是其中最大的那个。</p>\n\n<p>请你设计并实现对数时间复杂度的算法解决此问题。</p>\n\n<p> </p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入<code></code></strong><code>citations = [0,1,3,5,6]</code>\n<strong>输出:</strong>3 \n<strong>解释:</strong>给定数组表示研究者总共有 <code>5</code> 篇论文,每篇论文相应的被引用了 0<code>, 1, 3, 5, 6</code> 次。\n  由于研究者有 <code>3 </code>篇论文每篇<strong> 至少 </strong>被引用了 <code>3</code> 次,其余两篇论文每篇被引用<strong> 不多于</strong> <code>3</code> 次,所以她的<em> h </em>指数是 <code>3</code> 。</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>citations = [1,2,100]\n<strong>输出:</strong>2\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>n == citations.length</code></li>\n\t<li><code>1 <= n <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= citations[i] <= 1000</code></li>\n\t<li><code>citations</code> 按 <strong>升序排列</strong></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 186,
"likes": 188,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"H-Index\", \"titleSlug\": \"h-index\", \"difficulty\": \"Medium\", \"translatedTitle\": \"H \\u6307\\u6570\"}]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"55.6K\", \"totalSubmission\": \"121.4K\", \"totalAcceptedRaw\": 55648, \"totalSubmissionRaw\": 121370, \"acRate\": \"45.8%\"}",
"stats": "{\"totalAccepted\": \"56.9K\", \"totalSubmission\": \"124.2K\", \"totalAcceptedRaw\": 56865, \"totalSubmissionRaw\": 124195, \"acRate\": \"45.8%\"}",
"hints": [
"Expected runtime complexity is in <i>O</i>(log <i>n</i>) and the input is sorted."
],