Sesame·Software Engineer·Technical Phone Screen
- Design a StreamingMetrics class that ingests ASR (speech recognition) events, each containing a username and word count, and tracks two things: which user produced the longest single sentence, and how many unique users have been seen. The constructor takes a lookback window size limiting how many recent events are kept in memory. The ingest method must run in O(1) time and memory must stay bounded.
“This one took me a minute to fully unpack.”