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.
The time window is defined as [timePoint - timeRange, timePoint + timeRange] (inclusive). Only consider valid indices within the array bounds.
Return true if the system is healthy, false otherwise.
Window is [timePoint - timeRange, timePoint + timeRange] = [1, 5], which covers indices 1 to 5. Error rates in this window are [3, 2, 5, 4, 2]. All values are below threshold 6, so the system is healthy.
Window covers indices 1 to 5 with error rates [3, 2, 5, 4, 2]. The value 5 is not below threshold 4, so the system is unhealthy.
Window is [-1, 1], but valid indices are only [0, 1]. Error rates [1, 2] are all below threshold 5.