mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 15:01:40 +08:00
192 lines
41 KiB
JSON
192 lines
41 KiB
JSON
{
|
||
"data": {
|
||
"question": {
|
||
"questionId": "3678",
|
||
"questionFrontendId": "3408",
|
||
"categoryTitle": "Algorithms",
|
||
"boundTopicId": 3037721,
|
||
"title": "Design Task Manager",
|
||
"titleSlug": "design-task-manager",
|
||
"content": "<p>There is a task management system that allows users to manage their tasks, each associated with a priority. The system should efficiently handle adding, modifying, executing, and removing tasks.</p>\n\n<p>Implement the <code>TaskManager</code> class:</p>\n\n<ul>\n\t<li>\n\t<p><code>TaskManager(vector<vector<int>>& tasks)</code> initializes the task manager with a list of user-task-priority triples. Each element in the input list is of the form <code>[userId, taskId, priority]</code>, which adds a task to the specified user with the given priority.</p>\n\t</li>\n\t<li>\n\t<p><code>void add(int userId, int taskId, int priority)</code> adds a task with the specified <code>taskId</code> and <code>priority</code> to the user with <code>userId</code>. It is <strong>guaranteed</strong> that <code>taskId</code> does not <em>exist</em> in the system.</p>\n\t</li>\n\t<li>\n\t<p><code>void edit(int taskId, int newPriority)</code> updates the priority of the existing <code>taskId</code> to <code>newPriority</code>. It is <strong>guaranteed</strong> that <code>taskId</code> <em>exists</em> in the system.</p>\n\t</li>\n\t<li>\n\t<p><code>void rmv(int taskId)</code> removes the task identified by <code>taskId</code> from the system. It is <strong>guaranteed</strong> that <code>taskId</code> <em>exists</em> in the system.</p>\n\t</li>\n\t<li>\n\t<p><code>int execTop()</code> executes the task with the <strong>highest</strong> priority across all users. If there are multiple tasks with the same <strong>highest</strong> priority, execute the one with the highest <code>taskId</code>. After executing, the<strong> </strong><code>taskId</code><strong> </strong>is <strong>removed</strong> from the system. Return the <code>userId</code> associated with the executed task. If no tasks are available, return -1.</p>\n\t</li>\n</ul>\n\n<p><strong>Note</strong> that a user may be assigned multiple tasks.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong><br />\n<span class=\"example-io\">["TaskManager", "add", "edit", "execTop", "rmv", "add", "execTop"]<br />\n[[[[1, 101, 10], [2, 102, 20], [3, 103, 15]]], [4, 104, 5], [102, 8], [], [101], [5, 105, 15], []]</span></p>\n\n<p><strong>Output:</strong><br />\n<span class=\"example-io\">[null, null, null, 3, null, null, 5] </span></p>\n\n<p><strong>Explanation</strong></p>\nTaskManager taskManager = new TaskManager([[1, 101, 10], [2, 102, 20], [3, 103, 15]]); // Initializes with three tasks for Users 1, 2, and 3.<br />\ntaskManager.add(4, 104, 5); // Adds task 104 with priority 5 for User 4.<br />\ntaskManager.edit(102, 8); // Updates priority of task 102 to 8.<br />\ntaskManager.execTop(); // return 3. Executes task 103 for User 3.<br />\ntaskManager.rmv(101); // Removes task 101 from the system.<br />\ntaskManager.add(5, 105, 15); // Adds task 105 with priority 15 for User 5.<br />\ntaskManager.execTop(); // return 5. Executes task 105 for User 5.</div>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= tasks.length <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= userId <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= taskId <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= priority <= 10<sup>9</sup></code></li>\n\t<li><code>0 <= newPriority <= 10<sup>9</sup></code></li>\n\t<li>At most <code>2 * 10<sup>5</sup></code> calls will be made in <strong>total</strong> to <code>add</code>, <code>edit</code>, <code>rmv</code>, and <code>execTop</code> methods.</li>\n\t<li>The input is generated such that <code>taskId</code> will be valid.</li>\n</ul>\n",
|
||
"translatedTitle": "设计任务管理器",
|
||
"translatedContent": "<p>一个任务管理器系统可以让用户管理他们的任务,每个任务有一个优先级。这个系统需要高效地处理添加、修改、执行和删除任务的操作。</p>\n\n<p>请你设计一个 <code>TaskManager</code> 类:</p>\n\n<ul>\n\t<li>\n\t<p><code>TaskManager(vector<vector<int>>& tasks)</code> 初始化任务管理器,初始化的数组格式为 <code>[userId, taskId, priority]</code> ,表示给 <code>userId</code> 添加一个优先级为 <code>priority</code> 的任务 <code>taskId</code> 。</p>\n\t</li>\n\t<li>\n\t<p><code>void add(int userId, int taskId, int priority)</code> 表示给用户 <code>userId</code> 添加一个优先级为 <code>priority</code> 的任务 <code>taskId</code> ,输入 <strong>保证 </strong><code>taskId</code> 不在系统中。</p>\n\t</li>\n\t<li>\n\t<p><code>void edit(int taskId, int newPriority)</code> 更新已经存在的任务 <code>taskId</code> 的优先级为 <code>newPriority</code> 。输入 <strong>保证</strong> <code>taskId</code> 存在于系统中。</p>\n\t</li>\n\t<li>\n\t<p><code>void rmv(int taskId)</code> 从系统中删除任务 <code>taskId</code> 。输入 <strong>保证</strong> <code>taskId</code> 存在于系统中。</p>\n\t</li>\n\t<li>\n\t<p><code>int execTop()</code> 执行所有用户的任务中优先级 <strong>最高</strong> 的任务,如果有多个任务优先级相同且都为 <strong>最高</strong> ,执行 <code>taskId</code> 最大的一个任务。执行完任务后,<code>taskId</code><strong> </strong>从系统中 <strong>删除</strong> 。同时请你返回这个任务所属的用户 <code>userId</code> 。如果不存在任何任务,返回 -1 。</p>\n\t</li>\n</ul>\n\n<p><strong>注意</strong> ,一个用户可能被安排多个任务。</p>\n\n<p> </p>\n\n<p><strong class=\"example\">示例 1:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>输入:</strong><br />\n<span class=\"example-io\">[\"TaskManager\", \"add\", \"edit\", \"execTop\", \"rmv\", \"add\", \"execTop\"]<br />\n[[[[1, 101, 10], [2, 102, 20], [3, 103, 15]]], [4, 104, 5], [102, 8], [], [101], [5, 105, 15], []]</span></p>\n\n<p><strong>输出:</strong><br />\n<span class=\"example-io\">[null, null, null, 3, null, null, 5] </span></p>\n\n<p><strong>解释:</strong></p>\nTaskManager taskManager = new TaskManager([[1, 101, 10], [2, 102, 20], [3, 103, 15]]); // 分别给用户 1 ,2 和 3 初始化一个任务。<br />\ntaskManager.add(4, 104, 5); // 给用户 4 添加优先级为 5 的任务 104 。<br />\ntaskManager.edit(102, 8); // 更新任务 102 的优先级为 8 。<br />\ntaskManager.execTop(); // 返回 3 。执行用户 3 的任务 103 。<br />\ntaskManager.rmv(101); // 将系统中的任务 101 删除。<br />\ntaskManager.add(5, 105, 15); // 给用户 5 添加优先级为 15 的任务 105 。<br />\ntaskManager.execTop(); // 返回 5 。执行用户 5 的任务 105 。</div>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= tasks.length <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= userId <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= taskId <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= priority <= 10<sup>9</sup></code></li>\n\t<li><code>0 <= newPriority <= 10<sup>9</sup></code></li>\n\t<li><code>add</code> ,<code>edit</code> ,<code>rmv</code> 和 <code>execTop</code> 的总操作次数 <strong>加起来</strong> 不超过 <code>2 * 10<sup>5</sup></code> 次。</li>\n\t<li>输入保证 <code>taskId</code> 是合法的。</li>\n</ul>\n",
|
||
"isPaidOnly": false,
|
||
"difficulty": "Medium",
|
||
"likes": 2,
|
||
"dislikes": 0,
|
||
"isLiked": null,
|
||
"similarQuestions": "[]",
|
||
"contributors": [],
|
||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"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, \"cangjie\": false}",
|
||
"topicTags": [
|
||
{
|
||
"name": "Design",
|
||
"slug": "design",
|
||
"translatedName": "设计",
|
||
"__typename": "TopicTagNode"
|
||
},
|
||
{
|
||
"name": "Hash Table",
|
||
"slug": "hash-table",
|
||
"translatedName": "哈希表",
|
||
"__typename": "TopicTagNode"
|
||
},
|
||
{
|
||
"name": "Ordered Set",
|
||
"slug": "ordered-set",
|
||
"translatedName": "有序集合",
|
||
"__typename": "TopicTagNode"
|
||
},
|
||
{
|
||
"name": "Heap (Priority Queue)",
|
||
"slug": "heap-priority-queue",
|
||
"translatedName": "堆(优先队列)",
|
||
"__typename": "TopicTagNode"
|
||
}
|
||
],
|
||
"companyTagStats": null,
|
||
"codeSnippets": [
|
||
{
|
||
"lang": "C++",
|
||
"langSlug": "cpp",
|
||
"code": "class TaskManager {\npublic:\n TaskManager(vector<vector<int>>& tasks) {\n \n }\n \n void add(int userId, int taskId, int priority) {\n \n }\n \n void edit(int taskId, int newPriority) {\n \n }\n \n void rmv(int taskId) {\n \n }\n \n int execTop() {\n \n }\n};\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * TaskManager* obj = new TaskManager(tasks);\n * obj->add(userId,taskId,priority);\n * obj->edit(taskId,newPriority);\n * obj->rmv(taskId);\n * int param_4 = obj->execTop();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Java",
|
||
"langSlug": "java",
|
||
"code": "class TaskManager {\n\n public TaskManager(List<List<Integer>> tasks) {\n \n }\n \n public void add(int userId, int taskId, int priority) {\n \n }\n \n public void edit(int taskId, int newPriority) {\n \n }\n \n public void rmv(int taskId) {\n \n }\n \n public int execTop() {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * TaskManager obj = new TaskManager(tasks);\n * obj.add(userId,taskId,priority);\n * obj.edit(taskId,newPriority);\n * obj.rmv(taskId);\n * int param_4 = obj.execTop();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Python",
|
||
"langSlug": "python",
|
||
"code": "class TaskManager(object):\n\n def __init__(self, tasks):\n \"\"\"\n :type tasks: List[List[int]]\n \"\"\"\n \n\n def add(self, userId, taskId, priority):\n \"\"\"\n :type userId: int\n :type taskId: int\n :type priority: int\n :rtype: None\n \"\"\"\n \n\n def edit(self, taskId, newPriority):\n \"\"\"\n :type taskId: int\n :type newPriority: int\n :rtype: None\n \"\"\"\n \n\n def rmv(self, taskId):\n \"\"\"\n :type taskId: int\n :rtype: None\n \"\"\"\n \n\n def execTop(self):\n \"\"\"\n :rtype: int\n \"\"\"\n \n\n\n# Your TaskManager object will be instantiated and called as such:\n# obj = TaskManager(tasks)\n# obj.add(userId,taskId,priority)\n# obj.edit(taskId,newPriority)\n# obj.rmv(taskId)\n# param_4 = obj.execTop()",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Python3",
|
||
"langSlug": "python3",
|
||
"code": "class TaskManager:\n\n def __init__(self, tasks: List[List[int]]):\n \n\n def add(self, userId: int, taskId: int, priority: int) -> None:\n \n\n def edit(self, taskId: int, newPriority: int) -> None:\n \n\n def rmv(self, taskId: int) -> None:\n \n\n def execTop(self) -> int:\n \n\n\n# Your TaskManager object will be instantiated and called as such:\n# obj = TaskManager(tasks)\n# obj.add(userId,taskId,priority)\n# obj.edit(taskId,newPriority)\n# obj.rmv(taskId)\n# param_4 = obj.execTop()",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "C",
|
||
"langSlug": "c",
|
||
"code": "\n\n\ntypedef struct {\n \n} TaskManager;\n\n\nTaskManager* taskManagerCreate(int** tasks, int tasksSize, int* tasksColSize) {\n \n}\n\nvoid taskManagerAdd(TaskManager* obj, int userId, int taskId, int priority) {\n \n}\n\nvoid taskManagerEdit(TaskManager* obj, int taskId, int newPriority) {\n \n}\n\nvoid taskManagerRmv(TaskManager* obj, int taskId) {\n \n}\n\nint taskManagerExecTop(TaskManager* obj) {\n \n}\n\nvoid taskManagerFree(TaskManager* obj) {\n \n}\n\n/**\n * Your TaskManager struct will be instantiated and called as such:\n * TaskManager* obj = taskManagerCreate(tasks, tasksSize, tasksColSize);\n * taskManagerAdd(obj, userId, taskId, priority);\n \n * taskManagerEdit(obj, taskId, newPriority);\n \n * taskManagerRmv(obj, taskId);\n \n * int param_4 = taskManagerExecTop(obj);\n \n * taskManagerFree(obj);\n*/",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "C#",
|
||
"langSlug": "csharp",
|
||
"code": "public class TaskManager {\n\n public TaskManager(IList<IList<int>> tasks) {\n \n }\n \n public void Add(int userId, int taskId, int priority) {\n \n }\n \n public void Edit(int taskId, int newPriority) {\n \n }\n \n public void Rmv(int taskId) {\n \n }\n \n public int ExecTop() {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * TaskManager obj = new TaskManager(tasks);\n * obj.Add(userId,taskId,priority);\n * obj.Edit(taskId,newPriority);\n * obj.Rmv(taskId);\n * int param_4 = obj.ExecTop();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "JavaScript",
|
||
"langSlug": "javascript",
|
||
"code": "/**\n * @param {number[][]} tasks\n */\nvar TaskManager = function(tasks) {\n \n};\n\n/** \n * @param {number} userId \n * @param {number} taskId \n * @param {number} priority\n * @return {void}\n */\nTaskManager.prototype.add = function(userId, taskId, priority) {\n \n};\n\n/** \n * @param {number} taskId \n * @param {number} newPriority\n * @return {void}\n */\nTaskManager.prototype.edit = function(taskId, newPriority) {\n \n};\n\n/** \n * @param {number} taskId\n * @return {void}\n */\nTaskManager.prototype.rmv = function(taskId) {\n \n};\n\n/**\n * @return {number}\n */\nTaskManager.prototype.execTop = function() {\n \n};\n\n/** \n * Your TaskManager object will be instantiated and called as such:\n * var obj = new TaskManager(tasks)\n * obj.add(userId,taskId,priority)\n * obj.edit(taskId,newPriority)\n * obj.rmv(taskId)\n * var param_4 = obj.execTop()\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "TypeScript",
|
||
"langSlug": "typescript",
|
||
"code": "class TaskManager {\n constructor(tasks: number[][]) {\n \n }\n\n add(userId: number, taskId: number, priority: number): void {\n \n }\n\n edit(taskId: number, newPriority: number): void {\n \n }\n\n rmv(taskId: number): void {\n \n }\n\n execTop(): number {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * var obj = new TaskManager(tasks)\n * obj.add(userId,taskId,priority)\n * obj.edit(taskId,newPriority)\n * obj.rmv(taskId)\n * var param_4 = obj.execTop()\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "PHP",
|
||
"langSlug": "php",
|
||
"code": "class TaskManager {\n /**\n * @param Integer[][] $tasks\n */\n function __construct($tasks) {\n \n }\n \n /**\n * @param Integer $userId\n * @param Integer $taskId\n * @param Integer $priority\n * @return NULL\n */\n function add($userId, $taskId, $priority) {\n \n }\n \n /**\n * @param Integer $taskId\n * @param Integer $newPriority\n * @return NULL\n */\n function edit($taskId, $newPriority) {\n \n }\n \n /**\n * @param Integer $taskId\n * @return NULL\n */\n function rmv($taskId) {\n \n }\n \n /**\n * @return Integer\n */\n function execTop() {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * $obj = TaskManager($tasks);\n * $obj->add($userId, $taskId, $priority);\n * $obj->edit($taskId, $newPriority);\n * $obj->rmv($taskId);\n * $ret_4 = $obj->execTop();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Swift",
|
||
"langSlug": "swift",
|
||
"code": "\nclass TaskManager {\n\n init(_ tasks: [[Int]]) {\n \n }\n \n func add(_ userId: Int, _ taskId: Int, _ priority: Int) {\n \n }\n \n func edit(_ taskId: Int, _ newPriority: Int) {\n \n }\n \n func rmv(_ taskId: Int) {\n \n }\n \n func execTop() -> Int {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * let obj = TaskManager(tasks)\n * obj.add(userId, taskId, priority)\n * obj.edit(taskId, newPriority)\n * obj.rmv(taskId)\n * let ret_4: Int = obj.execTop()\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Kotlin",
|
||
"langSlug": "kotlin",
|
||
"code": "class TaskManager(tasks: List<List<Int>>) {\n\n fun add(userId: Int, taskId: Int, priority: Int) {\n \n }\n\n fun edit(taskId: Int, newPriority: Int) {\n \n }\n\n fun rmv(taskId: Int) {\n \n }\n\n fun execTop(): Int {\n \n }\n\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * var obj = TaskManager(tasks)\n * obj.add(userId,taskId,priority)\n * obj.edit(taskId,newPriority)\n * obj.rmv(taskId)\n * var param_4 = obj.execTop()\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Dart",
|
||
"langSlug": "dart",
|
||
"code": "class TaskManager {\n\n TaskManager(List<List<int>> tasks) {\n \n }\n \n void add(int userId, int taskId, int priority) {\n \n }\n \n void edit(int taskId, int newPriority) {\n \n }\n \n void rmv(int taskId) {\n \n }\n \n int execTop() {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * TaskManager obj = TaskManager(tasks);\n * obj.add(userId,taskId,priority);\n * obj.edit(taskId,newPriority);\n * obj.rmv(taskId);\n * int param4 = obj.execTop();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Go",
|
||
"langSlug": "golang",
|
||
"code": "type TaskManager struct {\n \n}\n\n\nfunc Constructor(tasks [][]int) TaskManager {\n \n}\n\n\nfunc (this *TaskManager) Add(userId int, taskId int, priority int) {\n \n}\n\n\nfunc (this *TaskManager) Edit(taskId int, newPriority int) {\n \n}\n\n\nfunc (this *TaskManager) Rmv(taskId int) {\n \n}\n\n\nfunc (this *TaskManager) ExecTop() int {\n \n}\n\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * obj := Constructor(tasks);\n * obj.Add(userId,taskId,priority);\n * obj.Edit(taskId,newPriority);\n * obj.Rmv(taskId);\n * param_4 := obj.ExecTop();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Ruby",
|
||
"langSlug": "ruby",
|
||
"code": "class TaskManager\n\n=begin\n :type tasks: Integer[][]\n=end\n def initialize(tasks)\n \n end\n\n\n=begin\n :type user_id: Integer\n :type task_id: Integer\n :type priority: Integer\n :rtype: Void\n=end\n def add(user_id, task_id, priority)\n \n end\n\n\n=begin\n :type task_id: Integer\n :type new_priority: Integer\n :rtype: Void\n=end\n def edit(task_id, new_priority)\n \n end\n\n\n=begin\n :type task_id: Integer\n :rtype: Void\n=end\n def rmv(task_id)\n \n end\n\n\n=begin\n :rtype: Integer\n=end\n def exec_top()\n \n end\n\n\nend\n\n# Your TaskManager object will be instantiated and called as such:\n# obj = TaskManager.new(tasks)\n# obj.add(user_id, task_id, priority)\n# obj.edit(task_id, new_priority)\n# obj.rmv(task_id)\n# param_4 = obj.exec_top()",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Scala",
|
||
"langSlug": "scala",
|
||
"code": "class TaskManager(_tasks: List[List[Int]]) {\n\n def add(userId: Int, taskId: Int, priority: Int): Unit = {\n \n }\n\n def edit(taskId: Int, newPriority: Int): Unit = {\n \n }\n\n def rmv(taskId: Int): Unit = {\n \n }\n\n def execTop(): Int = {\n \n }\n\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * val obj = new TaskManager(tasks)\n * obj.add(userId,taskId,priority)\n * obj.edit(taskId,newPriority)\n * obj.rmv(taskId)\n * val param_4 = obj.execTop()\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Rust",
|
||
"langSlug": "rust",
|
||
"code": "struct TaskManager {\n\n}\n\n\n/** \n * `&self` means the method takes an immutable reference.\n * If you need a mutable reference, change it to `&mut self` instead.\n */\nimpl TaskManager {\n\n fn new(tasks: Vec<Vec<i32>>) -> Self {\n \n }\n \n fn add(&self, user_id: i32, task_id: i32, priority: i32) {\n \n }\n \n fn edit(&self, task_id: i32, new_priority: i32) {\n \n }\n \n fn rmv(&self, task_id: i32) {\n \n }\n \n fn exec_top(&self) -> i32 {\n \n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * let obj = TaskManager::new(tasks);\n * obj.add(userId, taskId, priority);\n * obj.edit(taskId, newPriority);\n * obj.rmv(taskId);\n * let ret_4: i32 = obj.exec_top();\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Racket",
|
||
"langSlug": "racket",
|
||
"code": "(define task-manager%\n (class object%\n (super-new)\n \n ; tasks : (listof (listof exact-integer?))\n (init-field\n tasks)\n \n ; add : exact-integer? exact-integer? exact-integer? -> void?\n (define/public (add user-id task-id priority)\n )\n ; edit : exact-integer? exact-integer? -> void?\n (define/public (edit task-id new-priority)\n )\n ; rmv : exact-integer? -> void?\n (define/public (rmv task-id)\n )\n ; exec-top : -> exact-integer?\n (define/public (exec-top)\n )))\n\n;; Your task-manager% object will be instantiated and called as such:\n;; (define obj (new task-manager% [tasks tasks]))\n;; (send obj add user-id task-id priority)\n;; (send obj edit task-id new-priority)\n;; (send obj rmv task-id)\n;; (define param_4 (send obj exec-top))",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Erlang",
|
||
"langSlug": "erlang",
|
||
"code": "-spec task_manager_init_(Tasks :: [[integer()]]) -> any().\ntask_manager_init_(Tasks) ->\n .\n\n-spec task_manager_add(UserId :: integer(), TaskId :: integer(), Priority :: integer()) -> any().\ntask_manager_add(UserId, TaskId, Priority) ->\n .\n\n-spec task_manager_edit(TaskId :: integer(), NewPriority :: integer()) -> any().\ntask_manager_edit(TaskId, NewPriority) ->\n .\n\n-spec task_manager_rmv(TaskId :: integer()) -> any().\ntask_manager_rmv(TaskId) ->\n .\n\n-spec task_manager_exec_top() -> integer().\ntask_manager_exec_top() ->\n .\n\n\n%% Your functions will be called as such:\n%% task_manager_init_(Tasks),\n%% task_manager_add(UserId, TaskId, Priority),\n%% task_manager_edit(TaskId, NewPriority),\n%% task_manager_rmv(TaskId),\n%% Param_4 = task_manager_exec_top(),\n\n%% task_manager_init_ will be called before every test case, in which you can do some necessary initializations.",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Elixir",
|
||
"langSlug": "elixir",
|
||
"code": "defmodule TaskManager do\n @spec init_(tasks :: [[integer]]) :: any\n def init_(tasks) do\n \n end\n\n @spec add(user_id :: integer, task_id :: integer, priority :: integer) :: any\n def add(user_id, task_id, priority) do\n \n end\n\n @spec edit(task_id :: integer, new_priority :: integer) :: any\n def edit(task_id, new_priority) do\n \n end\n\n @spec rmv(task_id :: integer) :: any\n def rmv(task_id) do\n \n end\n\n @spec exec_top() :: integer\n def exec_top() do\n \n end\nend\n\n# Your functions will be called as such:\n# TaskManager.init_(tasks)\n# TaskManager.add(user_id, task_id, priority)\n# TaskManager.edit(task_id, new_priority)\n# TaskManager.rmv(task_id)\n# param_4 = TaskManager.exec_top()\n\n# TaskManager.init_ will be called before every test case, in which you can do some necessary initializations.",
|
||
"__typename": "CodeSnippetNode"
|
||
},
|
||
{
|
||
"lang": "Cangjie",
|
||
"langSlug": "cangjie",
|
||
"code": "class TaskManager {\n init(tasks: ArrayList<ArrayList<Int64>>) {\n\n }\n \n func add(userId: Int64, taskId: Int64, priority: Int64): Unit {\n\n }\n \n func edit(taskId: Int64, newPriority: Int64): Unit {\n\n }\n \n func rmv(taskId: Int64): Unit {\n\n }\n \n func execTop(): Int64 {\n\n }\n}\n\n/**\n * Your TaskManager object will be instantiated and called as such:\n * let obj: TaskManager = TaskManager(tasks)\n * obj.add(userId,taskId,priority)\n * obj.edit(taskId,newPriority)\n * obj.rmv(taskId)\n * let param_4 = obj.execTop()\n */",
|
||
"__typename": "CodeSnippetNode"
|
||
}
|
||
],
|
||
"stats": "{\"totalAccepted\": \"1.1K\", \"totalSubmission\": \"3.4K\", \"totalAcceptedRaw\": 1123, \"totalSubmissionRaw\": 3372, \"acRate\": \"33.3%\"}",
|
||
"hints": [],
|
||
"solution": null,
|
||
"status": null,
|
||
"sampleTestCase": "[\"TaskManager\",\"add\",\"edit\",\"execTop\",\"rmv\",\"add\",\"execTop\"]\n[[[[1,101,10],[2,102,20],[3,103,15]]],[4,104,5],[102,8],[],[101],[5,105,15],[]]",
|
||
"metaData": "{\n \"classname\": \"TaskManager\",\n \"constructor\": {\n \"params\": [\n {\n \"type\": \"list<list<integer>>\",\n \"name\": \"tasks\"\n }\n ]\n },\n \"methods\": [\n {\n \"params\": [\n {\n \"type\": \"integer\",\n \"name\": \"userId\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"taskId\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"priority\"\n }\n ],\n \"name\": \"add\",\n \"return\": {\n \"type\": \"void\"\n }\n },\n {\n \"params\": [\n {\n \"type\": \"integer\",\n \"name\": \"taskId\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"newPriority\"\n }\n ],\n \"name\": \"edit\",\n \"return\": {\n \"type\": \"void\"\n }\n },\n {\n \"params\": [\n {\n \"type\": \"integer\",\n \"name\": \"taskId\"\n }\n ],\n \"name\": \"rmv\",\n \"return\": {\n \"type\": \"void\"\n }\n },\n {\n \"params\": [],\n \"name\": \"execTop\",\n \"return\": {\n \"type\": \"integer\"\n }\n }\n ],\n \"return\": {\n \"type\": \"boolean\"\n },\n \"systemdesign\": true,\n \"manual\": false\n}",
|
||
"judgerAvailable": true,
|
||
"judgeType": "large",
|
||
"mysqlSchemas": [],
|
||
"enableRunCode": true,
|
||
"envInfo": "{\"cpp\":[\"C++\",\"<p>\\u7248\\u672c\\uff1a<code>clang 19<\\/code> \\u91c7\\u7528\\u6700\\u65b0 C++ 23 \\u6807\\u51c6\\uff0c\\u5e76\\u4f7f\\u7528 GCC 14 \\u63d0\\u4f9b\\u7684 <code>libstdc++<\\/code>\\u3002<\\/p>\\r\\n\\r\\n<p>\\u7f16\\u8bd1\\u65f6\\uff0c\\u5c06\\u4f1a\\u91c7\\u7528 <code>-O2<\\/code> \\u7ea7\\u4f18\\u5316\\uff0c\\u5e76\\u63d0\\u4f9b <code>-gline-tables-only<\\/code> \\u53c2\\u6570\\u3002<a href=\\\"https:\\/\\/github.com\\/google\\/sanitizers\\/wiki\\/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer<\\/a> \\u4e5f\\u88ab\\u5f00\\u542f\\u6765\\u68c0\\u6d4b <code>out-of-bounds<\\/code> \\u548c <code>use-after-free<\\/code> \\u9519\\u8bef\\u3002<\\/p>\\r\\n\\r\\n<p>\\u4e3a\\u4e86\\u4f7f\\u7528\\u65b9\\u4fbf\\uff0c\\u5927\\u90e8\\u5206\\u6807\\u51c6\\u5e93\\u7684\\u5934\\u6587\\u4ef6\\u5df2\\u7ecf\\u88ab\\u81ea\\u52a8\\u5bfc\\u5165\\u3002<\\/p>\"],\"java\":[\"Java\",\"<p>\\u7248\\u672c\\uff1a<code>OpenJDK 21<\\/code>\\u3002\\u4f7f\\u7528\\u7f16\\u8bd1\\u53c2\\u6570 <code>--enable-preview --release 21<\\/code><\\/p>\\r\\n\\r\\n<p>\\u4e3a\\u4e86\\u65b9\\u4fbf\\u8d77\\u89c1\\uff0c\\u5927\\u90e8\\u5206\\u6807\\u51c6\\u5e93\\u7684\\u5934\\u6587\\u4ef6\\u5df2\\u88ab\\u5bfc\\u5165\\u3002<\\/p>\\r\\n\\r\\n<p>\\u5305\\u542b Pair \\u7c7b: https:\\/\\/docs.oracle.com\\/javase\\/8\\/javafx\\/api\\/javafx\\/util\\/Pair.html <\\/p>\"],\"python\":[\"Python\",\"<p>\\u7248\\u672c\\uff1a <code>Python 2.7.18<\\/code><\\/p>\\r\\n\\r\\n<p>\\u4e3a\\u4e86\\u65b9\\u4fbf\\u8d77\\u89c1\\uff0c\\u5927\\u90e8\\u5206\\u5e38\\u7528\\u5e93\\u5df2\\u7ecf\\u88ab\\u81ea\\u52a8 \\u5bfc\\u5165\\uff0c\\u5982\\uff1a<a href=\\\"https:\\/\\/docs.python.org\\/2\\/library\\/array.html\\\" target=\\\"_blank\\\">array<\\/a>, <a href=\\\"https:\\/\\/docs.python.org\\/2\\/library\\/bisect.html\\\" target=\\\"_blank\\\">bisect<\\/a>, <a href=\\\"https:\\/\\/docs.python.org\\/2\\/library\\/collections.html\\\" target=\\\"_blank\\\">collections<\\/a>\\u3002\\u5982\\u679c\\u60a8\\u9700\\u8981\\u4f7f\\u7528\\u5176\\u4ed6\\u5e93\\u51fd\\u6570\\uff0c\\u8bf7\\u81ea\\u884c\\u5bfc\\u5165\\u3002<\\/p>\\r\\n\\r\\n<p>\\u6ce8\\u610f Python 2.7 <a href=\\\"https:\\/\\/www.python.org\\/dev\\/peps\\/pep-0373\\/\\\" target=\\\"_blank\\\">\\u5df2\\u4e0d\\u518d\\u7ef4\\u62a4<\\/a>\\u3002 \\u5982\\u60f3\\u4f7f\\u7528\\u6700\\u65b0\\u7248\\u7684Python\\uff0c\\u8bf7\\u9009\\u62e9Python 3\\u3002<\\/p>\"],\"c\":[\"C\",\"<p>\\u7248\\u672c\\uff1a<code>GCC 14<\\/code>\\uff0c\\u91c7\\u7528 GNU11 \\u6807\\u51c6\\u3002<\\/p>\\r\\n\\r\\n<p>\\u7f16\\u8bd1\\u65f6\\uff0c\\u5c06\\u4f1a\\u91c7\\u7528 <code>-O2<\\/code> \\u7ea7\\u4f18\\u5316\\uff0c\\u5e76\\u63d0\\u4f9b <code>-g1<\\/code> \\u53c2\\u6570\\u3002 <a href=\\\"https:\\/\\/github.com\\/google\\/sanitizers\\/wiki\\/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer<\\/a> \\u4e5f\\u88ab\\u5f00\\u542f\\u6765\\u68c0\\u6d4b <code>out-of-bounds<\\/code> \\u548c <code>use-after-free<\\/code> \\u9519\\u8bef\\u3002<\\/p>\\r\\n\\r\\n<p>\\u4e3a\\u4e86\\u4f7f\\u7528\\u65b9\\u4fbf\\uff0c\\u5927\\u90e8\\u5206\\u6807\\u51c6\\u5e93\\u7684\\u5934\\u6587\\u4ef6\\u5df2\\u7ecf\\u88ab\\u81ea\\u52a8\\u5bfc\\u5165\\u3002<\\/p>\\r\\n\\r\\n<p>\\u5982\\u60f3\\u4f7f\\u7528\\u54c8\\u5e0c\\u8868\\u8fd0\\u7b97, \\u60a8\\u53ef\\u4ee5\\u4f7f\\u7528 <a href=\\\"https:\\/\\/troydhanson.github.io\\/uthash\\/\\\" target=\\\"_blank\\\">uthash<\\/a>\\u3002 \\\"uthash.h\\\"\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5bfc\\u5165\\u3002\\u8bf7\\u770b\\u5982\\u4e0b\\u793a\\u4f8b:<\\/p>\\r\\n\\r\\n<p><b>1. \\u5f80\\u54c8\\u5e0c\\u8868\\u4e2d\\u6dfb\\u52a0\\u4e00\\u4e2a\\u5bf9\\u8c61\\uff1a<\\/b>\\r\\n<pre>\\r\\nstruct hash_entry {\\r\\n int id; \\/* we'll use this field as the key *\\/\\r\\n char name[10];\\r\\n UT_hash_handle hh; \\/* makes this structure hashable *\\/\\r\\n};\\r\\n\\r\\nstruct hash_entry *users = NULL;\\r\\n\\r\\nvoid add_user(struct hash_entry *s) {\\r\\n HASH_ADD_INT(users, id, s);\\r\\n}\\r\\n<\\/pre>\\r\\n<\\/p>\\r\\n\\r\\n<p><b>2. \\u5728\\u54c8\\u5e0c\\u8868\\u4e2d\\u67e5\\u627e\\u4e00\\u4e2a\\u5bf9\\u8c61\\uff1a<\\/b>\\r\\n<pre>\\r\\nstruct hash_entry *find_user(int user_id) {\\r\\n struct hash_entry *s;\\r\\n HASH_FIND_INT(users, &user_id, s);\\r\\n return s;\\r\\n}\\r\\n<\\/pre>\\r\\n<\\/p>\\r\\n\\r\\n<p><b>3. \\u4ece\\u54c8\\u5e0c\\u8868\\u4e2d\\u5220\\u9664\\u4e00\\u4e2a\\u5bf9\\u8c61\\uff1a<\\/b>\\r\\n<pre>\\r\\nvoid delete_user(struct hash_entry *user) {\\r\\n HASH_DEL(users, user); \\r\\n}\\r\\n<\\/pre>\\r\\n<\\/p>\"],\"csharp\":[\"C#\",\"<p><a href=\\\"https:\\/\\/learn.microsoft.com\\/en-us\\/dotnet\\/csharp\\/whats-new\\/csharp-13\\\" target=\\\"_blank\\\">C# 13<\\/a> \\u8fd0\\u884c\\u5728 .NET 9 \\u4e0a<\\/p>\"],\"javascript\":[\"JavaScript\",\"<p>\\u7248\\u672c\\uff1a<code>Node.js 20.10.0<\\/code><\\/p>\\r\\n\\r\\n<p>\\u60a8\\u7684\\u4ee3\\u7801\\u5728\\u6267\\u884c\\u65f6\\u5c06\\u5e26\\u4e0a <code>--harmony<\\/code> \\u6807\\u8bb0\\u6765\\u5f00\\u542f <a href=\\\"http:\\/\\/node.green\\/\\\" target=\\\"_blank\\\">\\u65b0\\u7248ES6\\u7279\\u6027<\\/a>\\u3002<\\/p>\\r\\n\\r\\n<p><a href=\\\"https:\\/\\/lodash.com\\\" target=\\\"_blank\\\">lodash.js<\\/a> \\u5e93\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5305\\u542b\\u3002<\\/p>\\r\\n\\r\\n<p> \\u5982\\u9700\\u4f7f\\u7528\\u961f\\u5217\\/\\u4f18\\u5148\\u961f\\u5217\\uff0c\\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/priority-queue\\/blob\\/v5\\/README.md\\\" target=\\\"_blank\\\"> datastructures-js\\/priority-queue@5.4.0<\\/a>\\uff0c<a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/queue\\/tree\\/v4.2.3\\\" target=\\\"_blank\\\"> datastructures-js\\/queue@4.2.3<\\/a> \\u4ee5\\u53ca <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/deque\\/tree\\/v1.0.4\\\" target=\\\"_blank\\\"> datastructures-js\\/deque@1.0.4<\\/a>\\u3002<\\/p>\"],\"ruby\":[\"Ruby\",\"<p>\\u4f7f\\u7528 <code>Ruby 3.2<\\/code> \\u6267\\u884c<\\/p>\\r\\n\\r\\n<p>\\u4e00\\u4e9b\\u5e38\\u7528\\u7684\\u6570\\u636e\\u7ed3\\u6784\\u5df2\\u5728 Algorithms \\u6a21\\u5757\\u4e2d\\u63d0\\u4f9b\\uff1ahttps:\\/\\/www.rubydoc.info\\/github\\/kanwei\\/algorithms\\/Algorithms<\\/p>\"],\"swift\":[\"Swift\",\"<p>\\u7248\\u672c\\uff1a<code>Swift 6.0<\\/code><\\/p>\\r\\n\\r\\n<p>\\u60a8\\u53ef\\u4ee5\\u4f7f\\u7528 <a href=\\\"https:\\/\\/github.com\\/apple\\/swift-algorithms\\/tree\\/1.2.0\\\" target=\\\"_blank\\\">swift-algorithms 1.2.0<\\/a>\\uff0c<a href=\\\"https:\\/\\/github.com\\/apple\\/swift-collections\\/tree\\/1.1.4\\\" target=\\\"_blank\\\">swift-collections 1.1.4<\\/a> \\u548c <a href=\\\"https:\\/\\/github.com\\/apple\\/swift-numerics\\/tree\\/1.0.2\\\" target=\\\"_blank\\\">swift-numerics 1.0.2<\\/a><\\/p>\\r\\n\\r\\n<p>\\u6211\\u4eec\\u901a\\u5e38\\u4fdd\\u8bc1\\u66f4\\u65b0\\u5230 <a href=\\\"https:\\/\\/swift.org\\/download\\/\\\" target=\\\"_blank\\\">Apple\\u653e\\u51fa\\u7684\\u6700\\u65b0\\u7248Swift<\\/a>\\u3002\\u5982\\u679c\\u60a8\\u53d1\\u73b0Swift\\u4e0d\\u662f\\u6700\\u65b0\\u7248\\u7684\\uff0c\\u8bf7\\u8054\\u7cfb\\u6211\\u4eec\\uff01\\u6211\\u4eec\\u5c06\\u5c3d\\u5feb\\u66f4\\u65b0\\u3002<\\/p>\"],\"golang\":[\"Go\",\"<p>\\u7248\\u672c\\uff1a<code>Go 1.23<\\/code><\\/p>\\r\\n\\r\\n<p>\\u652f\\u6301 <a href=\\\"https:\\/\\/pkg.go.dev\\/github.com\\/emirpasic\\/gods@v1.18.1\\\" target=\\\"_blank\\\">https:\\/\\/pkg.go.dev\\/github.com\\/emirpasic\\/gods@v1.18.1<\\/a> \\u548c <a href=\\\"https:\\/\\/pkg.go.dev\\/github.com\\/emirpasic\\/gods\\/v2@v2.0.0-alpha\\\" target=\\\"_blank\\\">https:\\/\\/pkg.go.dev\\/github.com\\/emirpasic\\/gods\\/v2@v2.0.0-alpha<\\/a> \\u7b2c\\u4e09\\u65b9\\u5e93\\u3002<\\/p>\"],\"python3\":[\"Python3\",\"<p>\\u7248\\u672c\\uff1a<code>Python 3.11<\\/code><\\/p>\\r\\n\\r\\n<p>\\u4e3a\\u4e86\\u65b9\\u4fbf\\u8d77\\u89c1\\uff0c\\u5927\\u90e8\\u5206\\u5e38\\u7528\\u5e93\\u5df2\\u7ecf\\u88ab\\u81ea\\u52a8 \\u5bfc\\u5165\\uff0c\\u5982<a href=\\\"https:\\/\\/docs.python.org\\/3\\/library\\/array.html\\\" target=\\\"_blank\\\">array<\\/a>, <a href=\\\"https:\\/\\/docs.python.org\\/3\\/library\\/bisect.html\\\" target=\\\"_blank\\\">bisect<\\/a>, <a href=\\\"https:\\/\\/docs.python.org\\/3\\/library\\/collections.html\\\" target=\\\"_blank\\\">collections<\\/a>\\u3002 \\u5982\\u679c\\u60a8\\u9700\\u8981\\u4f7f\\u7528\\u5176\\u4ed6\\u5e93\\u51fd\\u6570\\uff0c\\u8bf7\\u81ea\\u884c\\u5bfc\\u5165\\u3002<\\/p>\\r\\n\\r\\n<p>\\u5982\\u9700\\u4f7f\\u7528 Map\\/TreeMap \\u6570\\u636e\\u7ed3\\u6784\\uff0c\\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"http:\\/\\/www.grantjenks.com\\/docs\\/sortedcontainers\\/\\\" target=\\\"_blank\\\">sortedcontainers<\\/a> \\u5e93\\u3002<\\/p>\"],\"scala\":[\"Scala\",\"<p>\\u7248\\u672c\\uff1a<code>Scala 3.3.1<\\/code><\\/p>\"],\"kotlin\":[\"Kotlin\",\"<p>\\u7248\\u672c\\uff1a<code>Kotlin 1.9.0<\\/code><\\/p>\\r\\n\\r\\n<p>\\u6211\\u4eec\\u4f7f\\u7528\\u7684\\u662f JetBrains \\u63d0\\u4f9b\\u7684 experimental compiler\\u3002\\u5982\\u679c\\u60a8\\u8ba4\\u4e3a\\u60a8\\u9047\\u5230\\u4e86\\u7f16\\u8bd1\\u5668\\u76f8\\u5173\\u7684\\u95ee\\u9898\\uff0c\\u8bf7\\u5411\\u6211\\u4eec\\u53cd\\u9988<\\/p>\"],\"rust\":[\"Rust\",\"<p>\\u7248\\u672c\\uff1a<code>rust 1.79.0<\\/code><\\/p>\\r\\n\\r\\n<p>\\u652f\\u6301 crates.io \\u7684 <a href=\\\"https:\\/\\/crates.io\\/crates\\/rand\\\" target=\\\"_blank\\\">rand<\\/a> \\u548c <a href=\\\"https:\\/\\/crates.io\\/crates\\/regex\\\" target=\\\"_blank\\\">regex<\\/a><\\/p>\"],\"php\":[\"PHP\",\"<p><code>PHP 8.2<\\/code>.<\\/p>\\r\\n\\r\\n<p>With bcmath module.<\\/p>\"],\"typescript\":[\"TypeScript\",\"<p>TypeScript 5.1.6<\\/p>\\r\\n\\r\\n<p>Compile Options: --alwaysStrict --strictBindCallApply --strictFunctionTypes --target ES2022<\\/p>\\r\\n\\r\\n<p><a href=\\\"https:\\/\\/lodash.com\\\" target=\\\"_blank\\\">lodash.js<\\/a> \\u5e93\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5305\\u542b\\u3002<\\/p>\\r\\n\\r\\n<p> \\u5982\\u9700\\u4f7f\\u7528\\u961f\\u5217\\/\\u4f18\\u5148\\u961f\\u5217\\uff0c\\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/priority-queue\\/blob\\/v5\\/README.md\\\" target=\\\"_blank\\\"> datastructures-js\\/priority-queue@5.4.0<\\/a>\\uff0c<a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/queue\\/tree\\/v4.2.3\\\" target=\\\"_blank\\\"> datastructures-js\\/queue@4.2.3<\\/a> \\u4ee5\\u53ca <a href=\\\"https:\\/\\/github.com\\/datastructures-js\\/deque\\/tree\\/v1.0.4\\\" target=\\\"_blank\\\"> datastructures-js\\/deque@1.0.4<\\/a>\\u3002<\\/p>\"],\"racket\":[\"Racket\",\"<p><a href=\\\"https:\\/\\/docs.racket-lang.org\\/guide\\/performance.html#%28tech._c%29\\\" target=\\\"_blank\\\">Racket CS<\\/a> v8.15<\\/p>\\r\\n\\r\\n<p>\\u4f7f\\u7528 #lang racket<\\/p>\\r\\n\\r\\n<p>\\u5df2\\u9884\\u5148 (require data\\/gvector data\\/queue data\\/order data\\/heap). \\u82e5\\u9700\\u4f7f\\u7528\\u5176\\u5b83\\u6570\\u636e\\u7ed3\\u6784\\uff0c\\u53ef\\u81ea\\u884c require\\u3002<\\/p>\"],\"erlang\":[\"Erlang\",\"Erlang\\/OTP 26\"],\"elixir\":[\"Elixir\",\"Elixir 1.17 with Erlang\\/OTP 26\"],\"dart\":[\"Dart\",\"<p>Dart 3.2\\u3002\\u60a8\\u53ef\\u4ee5\\u4f7f\\u7528 <a href=\\\"https:\\/\\/pub.dev\\/packages\\/collection\\/versions\\/1.18.0\\\" target=\\\"_blank\\\">collection<\\/a> \\u5305<\\/p>\\r\\n\\r\\n<p>\\u60a8\\u7684\\u4ee3\\u7801\\u5c06\\u4f1a\\u88ab\\u4e0d\\u7f16\\u8bd1\\u76f4\\u63a5\\u8fd0\\u884c<\\/p>\"],\"cangjie\":[\"Cangjie\",\"<p>\\u7248\\u672c\\uff1a0.53.11 (cjnative)<\\/p>\\r\\n\\r\\n<p>\\u7f16\\u8bd1\\u53c2\\u6570\\uff1a<code>-O2 --disable-reflection<\\/code><\\/p>\\r\\n\\r\\n<p>\\u5feb\\u901f\\u5165\\u95e8\\u8bf7\\u67e5\\u9605<a href=\\\"https:\\/\\/leetcode.cn\\/leetbook\\/detail\\/cangjie\\/\\\" target=\\\"_blank\\\">\\u300c\\u4ed3\\u9889\\u7f16\\u7a0b\\u8bed\\u8a00\\u5f00\\u53d1\\u6307\\u5357\\u300d<\\/a><\\/p>\"]}",
|
||
"book": null,
|
||
"isSubscribed": false,
|
||
"isDailyQuestion": false,
|
||
"dailyRecordStatus": null,
|
||
"editorType": "CKEDITOR",
|
||
"ugcQuestionId": null,
|
||
"style": "LEETCODE",
|
||
"exampleTestcases": "[\"TaskManager\",\"add\",\"edit\",\"execTop\",\"rmv\",\"add\",\"execTop\"]\n[[[[1,101,10],[2,102,20],[3,103,15]]],[4,104,5],[102,8],[],[101],[5,105,15],[]]",
|
||
"__typename": "QuestionNode"
|
||
}
|
||
}
|
||
} |