Compute 5-minute rolling average load
Company: Databricks
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates understanding of sliding-window aggregation and efficient data-structure design for time-series event streams, focusing on computing a 5-minute rolling average load while managing performance and memory under high request volume.
Constraints
- `0 <= len(ops) == len(times) <= 2 * 10^5`
- `0 <= times[i] <= 10^9`
- `times[i] <= times[i + 1]` for all valid `i`
- `ops[i]` is either `"record"` or `"avgLoad"`