Monotonic stack problems were driving me crazy! This is the best explanation I have found. Thank you!
@symbol7672 жыл бұрын
Thanks L from Death Note! This explained it perfectly
@KacyCodes2 жыл бұрын
I should've mentioned that in a monotonically decreasing stack, the element at the bottom of the stack is the greatest element we've encountered up to the index we're at when iterating.
@SohilLadhani2 жыл бұрын
Good explanation. Please make videos on problems using monotonic queues as well. Keep the videos coming!
@VishnuvarthanM-n2f3 ай бұрын
tqq for this stuff ^^
@D_T2442 жыл бұрын
Hey just came across this, your explanation is very coherent and well-made. I'm excited to check out other videos of yours.
@annabellesun47192 жыл бұрын
very clear explanation !!!!! THANK YOU
@SJ-sx5xq Жыл бұрын
how is that linear time ?
@KacyCodes Жыл бұрын
Every element gets pushed once and popped at most once.
@sahilamin2197 ай бұрын
i like your hair, do not you get dandruff !!
@KacyCodes7 ай бұрын
Never cause I use anti-dandruff shampoo twice a week 😎