5 Comments

Perhaps you have a small misprint {2,5,5}, but i think it should be {2,-3,5}

Expand full comment

You are not looking for a maximum window, you are calculating the maximum from each position of the sliding window.

Expand full comment

So idea is find maksimum between nums in window on each step?

If we have e.g 0,-1,-2,1,1 and size 2 we will get 0,-1,1,1 ???? Is it correct suggestion?

Expand full comment

Yup, that's it.

Expand full comment

Oh, now i catch the idea. Sorry for incorrect comment. :)

Expand full comment