Company: oracle_28aug
Difficulty: medium
Load Spike Detector Problem Description The function getHighestLoadTimestamps will take one parameter: int load[D] : server loads at timestamps. The function should return an array of integers denoting the indices (0-based) of the timestamps, in increasing order, where load[i] > 2 * average server load . If none, return an empty array. Examples Example 1: Input: n = 3, load = [1, 2, 9] Output: [2] Explanation: The average load is (1 + 2 + 9) / 3 = 4. Only the value at timestamp 2 (0-based indexing) is greater than 2 * 4 = 8. Hence, the answer is [2]. Example 2: Input: n = 5, load = [1, 3, 7, 7, 1] Output: [2, 3] Explanation: The average load is (1+3+7+7+1)/5 = 3.4. The values at timestamps 2 and 3 (0-based indexing) are greater than 2 * 3.4 = 6.8. Hence, the answer is [2, 3]. Constraints 1 <= n <= 10^5 1 <= load[i] <= 10^4