#981

Time Based Key-Value Store

medium· Binary Searchruns: 0

Design a time-based key-value data structure that supports storing multiple values for the same key at different timestamps and retrieving the value at a specific timestamp. Implement set(key, value, timestamp) and get(key, timestamp), where get returns the value with the largest timestamp not greater than the given timestamp, or empty string if no such entry exists.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.