You are monitoring a system's error rates over time. Given an array errorRates where errorRates[i] represents the error rate at time i, determine if the system is healthy at a specific time point.
The system is considered healthy if ALL error rates within a time window are strictly below the given threshold (not equal to or above).
The time window is defined as [timePoint - timeRange, timePoint + timeRange] (inclusive). Only consider valid indices within the array bounds.
This is a straightforward array range query problem that tests boundary handling and comparison logic.
` errorRates = [1, 3, 2, 5, 4, 2, 1] timePoint = 3 timeRange = 2 threshold = 6
`
` errorRates = [1, 3, 2, 5, 4, 2, 1] timePoint = 3 timeRange = 2 threshold = 4
`
` errorRates = [1, 2, 3] timePoint = 0 timeRange = 1 threshold = 5
`
Use strict inequality (value must be strictly less than threshold)
Should we handle negative timePoint or timeRange values?
Is it guaranteed that timePoint is a valid index in the array?
What should we return for an empty window (though this shouldn't happen given constraints)?