Amazon·Software Engineer·Onsite - Coding / Algorithms
- Given a raw log stream, parse and aggregate entries grouped by a key (like user or event type), then return a sorted report. Clarify the input format before coding.
- Deduplicate log entries by event ID, keeping only the most recent occurrence, then return sorted results.
- How would you handle this log aggregation problem if the input is too large to fit on a single machine?
“I started coding too fast and had to backtrack when they asked what I'd do with malformed lines.”