Algorithm · Google · Hard
A log processing system receives a stream of records, each consisting of an integer timestamp and a string message. The sequence in which records arrive is not necessarily sorted by their timestamps. Duplicate messages (exact string equality) may appear multiple times at different timestamps. You need to implement two batch deduplication policies, and later a live‑stream processor. Batch policies Given a list of records and a policy string (either "keep_first" or…
Checking your access…