Find Indices With Index and Value Difference II
Track the index of the minimum and maximum seen at least indexDifference positions back, then test each new index against both.
Track the index of the minimum and maximum seen at least indexDifference positions back, then test each new index against both.