MAXIMUM ELEMENT | SLIDING WINDOW|DEQUE STL

Is question ka algorithjm yaad rkhna pdega kya ??
ese kya pta lgega konsa algorithm konse question mai use hona???

Hello @CODER_JATIN this you will get to know with practice.

Lekin , is question mai to is like ratta?

@CODER_JATIN no why to learn when you know that you have to find the answer in the string window then you will search only in that window and it is the optimised form of this string window question using deque.
believe me with solving more and more questions you will get to know which data structure to apply and when.

okay , can we also do this question using list???

@CODER_JATIN i think no:
even if you build any logic then it will be very cumbersome.