Company: Oracle_23sep
Difficulty: medium
System Load Monitor 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 i (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. Examples Example 1: Input: n = 4 loads = [8, 14, 5, 17] windowSize = 2 threshold = 10 Explanation: Let's analyze all possible windows of size 2: Window Range Average Load Is the average greater than threshold? [0, 1] (8 + 14) / 2 = 11 Yes [1, 2] (14 + 5) / 2 = 9.5 No [2, 3] (5 + 17) / 2 = 11 Yes At minute 0, only