MediumBinary Search
Time Based Key-Value Store
Query key value at timestamp
Solution Approach
Binary search on timestamps
Complexity Analysis
Time Complexity
O(log n)Space Complexity
O(n)Complexity
Time:O(log n)
Space:O(n)
Asked at
GoogleAmazon
Query key value at timestamp
Binary search on timestamps
Time Complexity
O(log n)Space Complexity
O(n)