LeetCode 635: Design Log Storage System
Problem Restatement We need to design a log storage system. Each log has: Field Meaning id Unique log ID timestamp Time string in Year:Month:Day:Hour:Minute:Second format The timestamp format looks like this: "2017:01:01:23:59:59" All parts are zero-padded. The system needs two operations: Operation Meaning put(id, timestamp) Store a log retrieve(start, end, granularity) Return IDs whose timestamps are inside the inclusive range The granularity tells us how much of the timestamp to...