Time Based Key-Value Store
Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp.
Time Based Key-Value Store

Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp.

Example 1:
Input: {"commands":["TimeMap","set","get","get","set","get","get"],"values":[[],["foo","bar",1],["foo",1],["foo",3],["foo","bar2",4],["foo",4],["foo",5]]}
Output: [null,null,"bar","bar",null,"bar2","bar2"]
Input
arr ={"commands":["TimeMap","set","get","get","set","get","get"],"values":[[],["foo","bar",1],["foo",1],["foo",3],["foo","bar2",4],["foo",4],["foo",5]]}

Init TimeMap

Get Key
Timestamp
0
Values for Key ""

Key not found / Empty

Result:

""
Variables
No variables to display
DepthFunction Call
Stack empty
0/28