I am not getting this approach

i could not understand prateek bhaiya’s approach but i did it on my own using basic sliding window technique
i am not able to get how he is doing it using deque
Any help would be appreciated


Refer to this video, please.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.