Company: ibm_10sep
Difficulty: medium
Detect High Load Windows Problem Description Identify time periods when a system experiences high load based on a rolling average calculation. For each minute in the monitoring period, calculate the average load over the most recent window of minutes. If this average exceeds the specified threshold, include that minute in your results. The function detectHighLoadWindows will take three inputs: int loads[] : system load at each minute (0-based) int windowSize : size of the rolling window in minutes int threshold : average load threshold to compare against The function returns a sorted array of minute indices where high load was detected, or an empty array if no such minutes exist. The function signature is provided below: vector detectHighLoadWindows(vector loads, int windowSize, int threshold) Input Format for Custom Testing The first line contains an integer, n , the size of the array loads . The next n lines contain an integer, loads[i] . The next line contains an integer, windowSize