Back to problems

Bounded Event Stream Unique-Key Queries

Algorithm · Snowflake · Hard

Capped Event Log Hard · Topics · Company Tags · Hints Design an event store that receives records one by one and keeps only a bounded number of them. Each record has a signed 64-bit integer timestamp and a non-empty key consisting only of lowercase English letters. The store has a capacity m. At all times it keeps the m inserted records with the largest timestamps, or all records if fewer than m have been inserted. If two records have the same timestamp, the record that…

Checking your access…