Very well explained, would be easier to learn without the moving background.
@JackHou-vw7hs Жыл бұрын
I loved the moving background. It helped me stay focused
@bluesteel1 Жыл бұрын
Everything was fine before i read your comment. Now i cant ignore it .
@jigar2238 Жыл бұрын
@@bluesteel1 😆
@siddhantprakash.8 ай бұрын
@@bluesteel1 😂
@adityapratapsinghtomer3624Ай бұрын
@@JackHou-vw7hs my man
@sibiranganath2 ай бұрын
It's a god level explanation of monotonic stack. A request from your rest subscriber: Don't have that running background in the tutorial it's irritating .
@PssGameplayER Жыл бұрын
first time heard about Monotonic Stack, thanks for explaining it so properly
@algo.monster Жыл бұрын
Our pleasure!
@yoDQ9 ай бұрын
Thank you for the monotonic stack explainer. It may be helpful to also show an image of the heights array above the image of the answer array to help visualize the relationship between the two better while popping and inserting.
@biswajeetpadhi100 Жыл бұрын
the background of this video is greatly designed. its very easy to focus with this background in motion
@algo.monster Жыл бұрын
can't tell if it's positive or sarcasm haha but yeah glad you like it!
@biswajeetpadhi100 Жыл бұрын
@@algo.monster the background in motion acts as a boundary to the actual content, so I think it really works.
@szymonpiechutowski2340 Жыл бұрын
I am a complete opposite to this idea, I feel like this 🤮 when I see it. It is not optimal for every 🧠
@guinea_horn5 күн бұрын
Really good explanation. I'll agree with everyone else and say that the background is extremely distracting, and it actually makes the bitrate of the whole video go down, making the quality poor whether I select 144p or 1080p. I also feel like you didn't explain the algorithm before going through the problem with the heights of people. You started going through the example, but I didn't know precisely what it was you were doing or why you were making the decisions that you were making. I think it would be nice to have a plain explanation of the problem and how the algorithm solves it before going through the problem step by step.
@sandeepamarnath329511 ай бұрын
Great video thanks. Trying to understand how the monotonic stack approach would be of O(n) time. We traverse the array only once for sure, but what about the pop operations? For a few elements of array, we are popping out of stack multiple times until we find a stack element that is greater than the current element, so are we not counting this towards the time complexity? If length of stack is k, wouldn't the overall time be O(nk)? Thanks again!
@algo.monster11 ай бұрын
Every element in the array is processed exactly once. When an element is popped from the stack, it does not re-enter. Consequently, the maximum number of operations is 2n, accounting for each element being pushed and popped once.
@11csepratikshaargulewar715 күн бұрын
I kindly request that you should make videos avoiding moving backgrounds, as they can be distracting while concentrating . By the way, great explanation!
@algo.monster5 күн бұрын
Noted thanks!
@KuaisArts Жыл бұрын
Wow! Thanks for walking through the example, it was very insightful
@rahbanghani40978 ай бұрын
would you be kind enough to share what is the application that you are using for the walk through of the solution :) Thank you in advance.
@alexsinx11 ай бұрын
Why is the time complexity O(n) if we have two nested loops? shouldn't it be o(n*m) where n is the number of elements in the array and m is the number of elements in the stack?
@algo.monster11 ай бұрын
The code can be indeed deceiving. But remember each element enters or exits at most once. This is why monotonic stack is a efficient data structure.
@LunaOoze4 ай бұрын
Perfect explanation, thank you !
@algo.monster4 ай бұрын
Glad it was helpful!
@ignassablinskas91755 ай бұрын
Very nice explanation, great job.
@algo.monster5 ай бұрын
Thank you!
@sharwariphadnis1298 Жыл бұрын
Awesome video! Easy to understand
@AyaGamal2010Ай бұрын
Great!
@nagendrabommireddi84378 ай бұрын
wow very good explanation. thank you..
@hardiksinghal13604 ай бұрын
Awesome explaination
@helloguys9201 Жыл бұрын
Wonderful Explanation and PPT's
@algo.monster Жыл бұрын
Glad you liked it!
@Spamuse-w3i8 ай бұрын
The background is too distracting
@codemonkey0076 ай бұрын
Why the solution iterative the array from right side to left side, is this order matter?
@TragicGFuel3 ай бұрын
The order is a choice, you could have used a strictly increasing function instead
@aleksandr_t Жыл бұрын
Great video, thank you a lot!
@algo.monster Жыл бұрын
Glad it helped!
@dimahodan232 Жыл бұрын
why brute force is O(n^2)? Each element doesn't start from the beginning of the array. Isn't it O(n*m) where m is i - k - 1? where k is the current element.
@algo.monster Жыл бұрын
k is not an input parameter. we have to express it in n. after dropping the content it's n^2
@douglas5260 Жыл бұрын
its n-1 + n-2 +n-3 ... = n**2
@BurtPredrag Жыл бұрын
@@douglas5260 its not multiplication it should be addition
@douglas5260 Жыл бұрын
@@BurtPredrag Yeah, I've corrected it. Thanks!
@himanshigarg1431Ай бұрын
Thank you so much
@algo.monsterАй бұрын
You're most welcome
@parulgarg536211 ай бұрын
Thanks for the video! Feedback on the moving background : VERY DISTURBING
@algo.monster11 ай бұрын
Thanks and Noted!
@literallyjustsomegirl9 ай бұрын
So helpful 😭🖤
@algo.monster9 ай бұрын
Glad it helped!
@tauicsicsicsАй бұрын
great explanation but the moving background really makes me dizzy, could not watch it for more than 1 minute
@dhruvsakariya3129 Жыл бұрын
you made it very easy by making visualizing approach. Thanks
@algo.monster Жыл бұрын
Glad it was helpful!
@kaszatus29 ай бұрын
Literally the worst sample, because not much of exploration... Maybe thats why for you its most confusing... As so its this video...
@MahmoudHassan-m2t25 күн бұрын
thanks
@Avighna9 ай бұрын
Before learning this, I'd just use a segment tree for the first question xD.
@AINikunjGour Жыл бұрын
You are Osm bro..
@algo.monster Жыл бұрын
Thanks ✌️
@googleit2490 Жыл бұрын
New Topic Learned!! Sep'11, 2023 06:36 pm
@RahulBansal145 ай бұрын
The moving background make it hard to follow.
@samueladdisu3729Ай бұрын
The moving background is very distracting. I can't even watch the full video