The idea is to find an anomalous value (i.e. it's less than X) in time series data (sorted by time), and check if this behavior continues during specified time (Y=2 hours).
If all values in sub-array (which represents 2 hours period) are ≤ X, the subarray is returned as a result, and we do not continue further.
Else search continues until such sub-array is found or we have no more data.
Is there an algorithm or family of algorithms that are suited for this task?
X = 10
Y = 2 hours
...during these 2 hours all values were consistently ≤ than X=4.
On the other hand, 00:00 - 02:00 range has X=11 at the end, so it isn't included in result.
There are approx. 1440 data points in the array (1 point per minute x 24 hours).
This shouldn't be a streaming algorithm, all needed data points are already available.
Data points are immutable, values (or time) don't change.
It's important that we use as little memory during the search as possible.
Search is run once a day, so the data is different and does not depend on previous searches.