InterviewDB Question

Time Series Sum: Compute Rolling and Cumulative Aggregates Over a Time Series

Question Details

Problem You receive a stream of (timestamp, value) events. Implement a class that supports two queries efficiently: (1) the sum of all values in the last w seconds, and (2) the cumulative sum from the beginning up to a given timestamp. Example: Follo…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding Onsite Phone