mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 14:58:56 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定 N 个人的出生年份和死亡年份,第 <code>i</code> 个人的出生年份为 <code>birth[i]</code>,死亡年份为 <code>death[i]</code>,实现一个方法以计算生存人数最多的年份。</p>\n\n<p>你可以假设所有人都出生于 1900 年至 2000 年(含 1900 和 2000 )之间。如果一个人在某一年的任意时期处于生存状态,那么他应该被纳入那一年的统计中。例如,生于 1908 年、死于 1909 年的人应当被列入 1908 年和 1909 年的计数。</p>\n\n<p>如果有多个年份生存人数相同且均为最大值,输出其中最小的年份。</p>\n\n<p> </p>\n\n<p><strong>示例:</strong></p>\n\n<pre>\n<strong>输入:</strong>\nbirth = {1900, 1901, 1950}\ndeath = {1948, 1951, 2000}\n<strong>输出:</strong> 1901\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>0 < birth.length == death.length <= 10000</code></li>\n\t<li><code>birth[i] <= death[i]</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 42,
|
||||
"likes": 44,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"12.4K\", \"totalSubmission\": \"18.2K\", \"totalAcceptedRaw\": 12373, \"totalSubmissionRaw\": 18196, \"acRate\": \"68.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"12.7K\", \"totalSubmission\": \"18.7K\", \"totalAcceptedRaw\": 12744, \"totalSubmissionRaw\": 18729, \"acRate\": \"68.0%\"}",
|
||||
"hints": [
|
||||
"方案 1:你能计算出每年有多少人活着吗?",
|
||||
"方案1:用散列表或数组试试,将出生年份映射到该年还有多少人活着。",
|
||||
|
||||
Reference in New Issue
Block a user