educative.io

Can we reimplement this algorithm without a varying window size?

For the given example code for sliding window implementation, can we use a non varying window size ? I mean in the loop, window’s end index are gradually increased.