You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solution/0900-0999/0981.Time Based Key-Value Store/README_EN.md
+53-27
Original file line number
Diff line number
Diff line change
@@ -6,40 +6,26 @@
6
6
7
7
<p>Create a timebased key-value store class <code>TimeMap</code>, that supports two operations.</p>
8
8
9
-
10
-
11
9
<p>1. <code>set(string key, string value, int timestamp)</code></p>
12
10
13
-
14
-
15
11
<ul>
16
12
<li>Stores the <code>key</code> and <code>value</code>, along with the given <code>timestamp</code>.</li>
17
13
</ul>
18
14
19
-
20
-
21
15
<p>2. <code>get(string key, int timestamp)</code></p>
22
16
23
-
24
-
25
17
<ul>
26
18
<li>Returns a value such that <code>set(key, value, timestamp_prev)</code> was called previously, with <code>timestamp_prev <= timestamp</code>.</li>
27
19
<li>If there are multiple such values, it returns the one with the largest <code>timestamp_prev</code>.</li>
28
20
<li>If there are no values, it returns the empty string (<code>""</code>).</li>
<li><code>TimeMap.set</code> and <code>TimeMap.get</code> functions will be called a total of <code>120000</code> times (combined) per test case.</li>
0 commit comments