mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3202",
|
||||
"questionFrontendId": "100128",
|
||||
"questionFrontendId": "2933",
|
||||
"categoryTitle": "Algorithms",
|
||||
"boundTopicId": 2521612,
|
||||
"title": "High-Access Employees",
|
||||
@@ -12,13 +12,38 @@
|
||||
"translatedContent": "<p>给你一个长度为 <code>n</code> 、下标从 <strong>0</strong> 开始的二维字符串数组 <code>access_times</code> 。对于每个 <code>i</code>(<code>0 <= i <= n - 1</code> ),<code>access_times[i][0]</code> 表示某位员工的姓名,<code>access_times[i][1]</code> 表示该员工的访问时间。<code>access_times</code> 中的所有条目都发生在同一天内。</p>\n\n<p>访问时间用 <strong>四位</strong> 数字表示, 符合 <strong>24 小时制</strong> ,例如 <code>\"0800\"</code> 或 <code>\"2250\"</code> 。</p>\n\n<p>如果员工在 <strong>同一小时内</strong> 访问系统 <strong>三次或更多</strong> ,则称其为 <strong>高访问</strong> 员工。</p>\n\n<p>时间间隔正好相差一小时的时间 <strong>不</strong> 被视为同一小时内。例如,<code>\"0815\"</code> 和 <code>\"0915\"</code> 不属于同一小时内。</p>\n\n<p>一天开始和结束时的访问时间不被计算为同一小时内。例如,<code>\"0005\"</code> 和 <code>\"2350\"</code> 不属于同一小时内。</p>\n\n<p>以列表形式,按任意顺序,返回所有 <strong>高访问</strong> 员工的姓名。</p>\n\n<p> </p>\n\n<p><strong class=\"example\">示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>access_times = [[\"a\",\"0549\"],[\"b\",\"0457\"],[\"a\",\"0532\"],[\"a\",\"0621\"],[\"b\",\"0540\"]]\n<strong>输出:</strong>[\"a\"]\n<strong>解释:</strong>\"a\" 在时间段 [05:32, 06:31] 内有三条访问记录,时间分别为 05:32 、05:49 和 06:21 。\n但是 \"b\" 的访问记录只有两条。\n因此,答案是 [\"a\"] 。</pre>\n\n<p><strong class=\"example\">示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>access_times = [[\"d\",\"0002\"],[\"c\",\"0808\"],[\"c\",\"0829\"],[\"e\",\"0215\"],[\"d\",\"1508\"],[\"d\",\"1444\"],[\"d\",\"1410\"],[\"c\",\"0809\"]]\n<strong>输出:</strong>[\"c\",\"d\"]\n<strong>解释:</strong>\"c\" 在时间段 [08:08, 09:07] 内有三条访问记录,时间分别为 08:08 、08:09 和 08:29 。\n\"d\" 在时间段 [14:10, 15:09] 内有三条访问记录,时间分别为 14:10 、14:44 和 15:08 。\n然而,\"e\" 只有一条访问记录,因此不能包含在答案中,最终答案是 [\"c\",\"d\"] 。</pre>\n\n<p><strong class=\"example\">示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>access_times = [[\"cd\",\"1025\"],[\"ab\",\"1025\"],[\"cd\",\"1046\"],[\"cd\",\"1055\"],[\"ab\",\"1124\"],[\"ab\",\"1120\"]]\n<strong>输出:</strong>[\"ab\",\"cd\"]\n<strong>解释:</strong>\"ab\"在时间段 [10:25, 11:24] 内有三条访问记录,时间分别为 10:25 、11:20 和 11:24 。\n\"cd\" 在时间段 [10:25, 11:24] 内有三条访问记录,时间分别为 10:25 、10:46 和 10:55 。\n因此,答案是 [\"ab\",\"cd\"] 。</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= access_times.length <= 100</code></li>\n\t<li><code>access_times[i].length == 2</code></li>\n\t<li><code>1 <= access_times[i][0].length <= 10</code></li>\n\t<li><code>access_times[i][0]</code> 仅由小写英文字母组成。</li>\n\t<li><code>access_times[i][1].length == 4</code></li>\n\t<li><code>access_times[i][1]</code> 采用24小时制表示时间。</li>\n\t<li><code>access_times[i][1]</code> 仅由数字 <code>'0'</code> 到 <code>'9'</code> 组成。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"likes": 1,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": true, \"python\": true, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}",
|
||||
"topicTags": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Array",
|
||||
"slug": "array",
|
||||
"translatedName": "数组",
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Hash Table",
|
||||
"slug": "hash-table",
|
||||
"translatedName": "哈希表",
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "String",
|
||||
"slug": "string",
|
||||
"translatedName": "字符串",
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Sorting",
|
||||
"slug": "sorting",
|
||||
"translatedName": "排序",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": [
|
||||
{
|
||||
@@ -136,7 +161,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"3.1K\", \"totalSubmission\": \"6.9K\", \"totalAcceptedRaw\": 3150, \"totalSubmissionRaw\": 6932, \"acRate\": \"45.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"4.7K\", \"totalSubmission\": \"9.4K\", \"totalAcceptedRaw\": 4663, \"totalSubmissionRaw\": 9408, \"acRate\": \"49.6%\"}",
|
||||
"hints": [
|
||||
"Sort the access times in each person’s list.",
|
||||
"A person’s name should be in the answer list if there are <code>2</code> access times in his/her access time list (after sorting), where the index difference is at least <code>2</code> and the time difference is strictly less than <code>60</code> minutes."
|
||||
|
Reference in New Issue
Block a user