a simpler version of sliding window minima