LeetCode 981: Time Based Key-Value Store Explained (Binary Search Solution)
The elegant part of this problem is recognizing that the timestamps are already sorted because of the problem constraint. The combination of: a hash map for fast key lookup, and binary search on the timestamp list gives an optimal solution
