keyTimeMap
to store key-value pairs, where the value is an array of (timestamp, value)
pairs.set
method to append a new (timestamp, value)
pair to the array associated with the given key in keyTimeMap
.get
method to perform a binary search on the array associated with the given key to find the largest timestamp that is less than or equal to the requested timestamp.