Master Data Structures & Algorithms for FREE at AlgoMap.io/
@SaiyaraLBS3 ай бұрын
Thank you so much. This was the best and most straightforward explanation after trying others... straight up and visualized clearly plus coded cleanly as well thank you!!
@vivek.tiwary3 ай бұрын
Thanks for this. The idea is , the moment we see dip, we process the top of stack item in backward direction.
@anirudd015 ай бұрын
can we solve this with 2 pointer approach like storing rain water problem? if we are going with brute force can we use brute force + sliding window?
@Everafterbreak_3 ай бұрын
Great explanation, after the explanation I coded the thing by myself, and I did the exactly same code
@JoeTan-nq4fq3 ай бұрын
I use, for each ith rectangle, width = offset index to next smaller element + offset index to prev smaller element - 1 area is then height of the ith rectangle multiply the corresponding width, and return the max area. A little lengthy though
@saachigupta45454 ай бұрын
thank you so sir this is the best explanation I can get
@andrewcenteno34625 ай бұрын
Very good, this is a very complex topic
@franciscoerramuspe2 ай бұрын
What would I do without Greg's videos
@sonyolcu2315 күн бұрын
Same as NeetCode except stack tuple index and heights are interchanged.
@ILLITAMDEVISRIPRASADАй бұрын
How to come up with solution like this😩
@NoTMaFiA245 ай бұрын
hello sir you teach us very nice, but can you make videos for solve dialy question in leetcode it would be really helpful thank you