mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 10:51:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>
|
||||
["TimeLimitedCache", "set", "get", "count", "get"]
|
||||
[[], [1, 42, 100], [1], [], [1]]
|
||||
[0, 0, 50, 50, 150]
|
||||
actions = ["TimeLimitedCache", "set", "get", "count", "get"]
|
||||
values = [[], [1, 42, 100], [1], [], [1]]
|
||||
timeDeays = [0, 0, 50, 50, 150]
|
||||
<strong>输出:</strong> [null, false, 42, 1, -1]
|
||||
<strong>解释:</strong>
|
||||
在 t=0 时,缓存被构造。
|
||||
@@ -31,9 +31,9 @@
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>
|
||||
["TimeLimitedCache", "set", "set", "get", "get", "get", "count"]
|
||||
[[], [1, 42, 50], [1, 50, 100], [1], [1], [1], []]
|
||||
[0, 0, 40, 50, 120, 200, 250]
|
||||
actions = ["TimeLimitedCache", "set", "set", "get", "get", "get", "count"]
|
||||
values = [[], [1, 42, 50], [1, 50, 100], [1], [1], [1], []]
|
||||
timeDelays = [0, 0, 40, 50, 120, 200, 250]
|
||||
<strong>输出:</strong> [null, false, true, 50, 50, -1]
|
||||
<strong>解释:</strong>
|
||||
在 t=0 时,缓存被构造。
|
||||
@@ -51,8 +51,12 @@
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>0 <= key <= 10<sup>9</sup></code></li>
|
||||
<li><code>0 <= value <= 10<sup>9</sup></code></li>
|
||||
<li><code>0 <= key, value <= 10<sup>9</sup></code></li>
|
||||
<li><code>0 <= duration <= 1000</code></li>
|
||||
<li><code>方法调用总数不会超过100</code></li>
|
||||
<li><code>1 <= actions.length <= 100</code></li>
|
||||
<li><code>actions.length === values.length</code></li>
|
||||
<li><code>actions.length === timeDelays.length</code></li>
|
||||
<li><code>0 <= timeDelays[i] <= 1450</code></li>
|
||||
<li><code>actions[i]</code> 是 "TimeLimitedCache"、"set"、"get" 和 "count" 中的一个。</li>
|
||||
<li>第一个操作始终是 "TimeLimitedCache" 而且一定会以 0 毫秒的延迟立即执行</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user