NeetCode #287LC-981MediumBinary SearchNC 150NC 250
← Back to All Problems#287 · #981 · Time Based Key-Value Store(基于时间的键值存储)
📌 Problem Statement & Constraints
Design a time-based key-value store supporting
set(key, value, timestamp) and get(key, timestamp), which returns the value with the largest timestamp less than or equal to the given one, or an empty string. Timestamps for the same key are strictly increasing across set calls. Constraints: at most 2 * 10^5 calls.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!