Your question is Rolling Data and Complexity. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Describe a data structure you would use to store rolling data, and explain the algorithmic complexity of your approach.
Clarify whether the rolling window is count-based or time-based, whether data arrives in order, and which operations must be supported. Explain insertion, expiration, querying, memory usage, and how your design changes if the window receives high-frequency updates or out-of-order events.