Deduplicate and Order Batch and Streaming Logs
Company: Google
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Quick Answer: Reason through deduplicating unsorted logs under both keep-first and keep-latest semantics, then extend the contract to an online stream. Address deterministic ordering, stale state, timestamp ties, late arrivals, memory growth, finality, watermarks, and exactly-once expectations.