For each window of k consecutive values, report the maximum: peak CPU in each 5-minute window, or the highest price in each week.
Recomputing max per window is . A monotonic deque does it in : keep indices whose values are decreasing; drop indices that leave the window from the front, and drop smaller values from the back before adding a new one. The front is always the current maximum.
Implement window_max(nums, k) returning a list of len(nums) - k + 1 maxima. Return [] if k > len(nums), and raise ValueError if k < 1.