mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>请定义一个队列并实现函数 <code>max_value</code> 得到队列里的最大值,要求函数<code>max_value</code>、<code>push_back</code> 和 <code>pop_front</code> 的<strong>均摊</strong>时间复杂度都是O(1)。</p>\n\n<p>若队列为空,<code>pop_front</code> 和 <code>max_value</code> 需要返回 -1</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong> \n["MaxQueue","push_back","push_back","max_value","pop_front","max_value"]\n[[],[1],[2],[],[],[]]\n<strong>输出: </strong>[null,null,null,2,1,2]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong> \n["MaxQueue","pop_front","max_value"]\n[[],[],[]]\n<strong>输出: </strong>[null,-1,-1]\n</pre>\n\n<p> </p>\n\n<p><strong>限制:</strong></p>\n\n<ul>\n\t<li><code>1 <= push_back,pop_front,max_value的总操作数 <= 10000</code></li>\n\t<li><code>1 <= value <= 10^5</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 342,
|
||||
"likes": 345,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"118.7K\", \"totalSubmission\": \"249K\", \"totalAcceptedRaw\": 118691, \"totalSubmissionRaw\": 249042, \"acRate\": \"47.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"119.2K\", \"totalSubmission\": \"250.1K\", \"totalAcceptedRaw\": 119200, \"totalSubmissionRaw\": 250074, \"acRate\": \"47.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user