LONGEST VALID PARENTHESIS | LEETCODE # 32 | PYTHON OPTIMAL SOLUTION
Vložit
- čas přidán 23. 03. 2022
- In this video we are solving yet another fun parenthesis based question: Longest Valid Parenthesis.
Despite being marked a Hard level question, this one isn't actually that bad. There's only one small thing you need to realize in order to figure this one out and this is one of those problems that once you see it once, it's so intuitive as to how the solution works you can easily remember it in an interview setting.
If you are enjoying the content I'm producing and would like to see more, please consider dropping a subscription to my channel! It really helps me grow and will help you get into FAANG and all the perks that come with that! - Věda a technologie
you say this isnt actually hard haha but what i find hard is finding the intuition that tells us thatt we may have missed some valid parenthesis when we parse it only from left tor right. the left, right pointers is not the hard bit understand, the right to left parsing is.
Happy to see this channel growing :) way to go. It would also be nice to see a video like how we can tackle DSA for each company in FAANG like do we have to just do top100 for company tagged leetcode or the videos you mention with company tag or they do a variation on them
Thanks for the kind words! That’s definitely a good video idea for the future… each company is different and the way to approach the onsites varies
instead of saying that a right to left parsing is required, you should have given an example for the same; it helps in understanding the logic better
Thanks for the video.
Thank you!
Glad you enjoyed the video! Subscribe so you don’t miss future ones
nice explanation
Thanks! Make sure to subscribe so you don’t miss any uploads!
why dont use stack to solve?😶
because we need to find length not to check invalid