-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Implementing a time-based key-value store that supports storing values associated with keys and retrieving the value for a given key at a specified timestamp. This data structure must support two operations:
- set(key, value, timestamp): Store the key with the value at the given timestamp.
- get(key, timestamp): Return the value associated with the key at the largest timestamp that is less than or equal to the specified 3. timestamp. If there is no such timestamp, return None.
Constraints:
- The timestamps for set operations are strictly increasing.
- Keys and values are strings.
Edge Cases:
- If the key does not exist in the store, the function returns None.
- Binary search ensures we get the value closest to the requested timestamp.
Can you please assign this task to me under HactoberFest 2024.
Reactions are currently unavailable