Algorithm · Google · Medium
Temperature Sliding Window Stats Medium · Topics · Company Tags · Hints You are designing a class TemperatureTracker that maintains a sliding window of the most recent temperature measurements. A window size k is fixed when the tracker is created; all queries then consider only the last k recorded values. Implement the following interface: TemperatureTracker(int k) – initializes the tracker with a window capacity of k. void record(double temperature) – adds a new temperature…
Checking your access…