LONGEST VALID PARENTHESIS | LEETCODE # 32 | PYTHON OPTIMAL SOLUTION

Sdílet
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

Komentáře • 11

  • @samuraijosh1595
    @samuraijosh1595 Před 7 měsíci +6

    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.

  • @preityhansaa9150
    @preityhansaa9150 Před 2 lety +1

    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

    • @crackfaang
      @crackfaang  Před 2 lety

      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

  • @harshal9783
    @harshal9783 Před 17 dny +1

    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

  • @samuraijosh1595
    @samuraijosh1595 Před 7 měsíci

    Thanks for the video.

  • @mariocatzin503
    @mariocatzin503 Před 2 lety

    Thank you!

    • @crackfaang
      @crackfaang  Před 2 lety

      Glad you enjoyed the video! Subscribe so you don’t miss future ones

  • @amandwivedi1980
    @amandwivedi1980 Před 2 lety

    nice explanation

    • @crackfaang
      @crackfaang  Před 2 lety

      Thanks! Make sure to subscribe so you don’t miss any uploads!

  • @fxgg-ni4eu
    @fxgg-ni4eu Před 3 měsíci

    why dont use stack to solve?😶

    • @sachinvarma9949
      @sachinvarma9949 Před 24 dny

      because we need to find length not to check invalid