Hi, can u please explain why in this code he used ''while ((!q.empty()) and (q.front() <= i - k))" loop. I mean what is the significance of this particular loop.
Maximum Element Deque
hi @kartikey.rajput0071 u need to remove the elements from the front also as they are not the part of current window
Could you please explain it with an example ?
This is the first video on this particular concept