Leetcode 22. Generate Parentheses ||Code+ Explanation + Full recursion flow Walkthrough ||June Daily

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
    Example 1:
    Input: n = 3
    Output: ["((()))","(()())","(())()","()(())","()()()"]
    Example 2:
    Input: n = 1
    Output: ["()"]

Komentáře • 105

  • @parth_3856
    @parth_3856 Před 5 měsíci +7

    Seems like it's one of your initial videos! Quite RAW and CRISPY. GOD BLESS YOU...............

  • @user-vw9hl5qr8x
    @user-vw9hl5qr8x Před rokem +5

    I have spent the last couple of days studying backtracking and have watched a few videos and searched online, but I still struggle to comprehend the generate parentheses problem. I appreciate your step-by-step explanation. Thank you. 🙌

  • @kailashmaurya6528
    @kailashmaurya6528 Před 5 měsíci +2

    your explanation and those flow diagrams>>>>>>>>>>>>>>>>>>>>>>>>>>

  • @yashjobalia
    @yashjobalia Před 8 měsíci +2

    I really appreciate your effort of making the entire flow chart. I was very confused with this problem initially, but now it’s crystal clear to me. Thank You for your time and efforts.

  • @saichaithrik7134
    @saichaithrik7134 Před 2 měsíci

    Thank you so much for your explanation madam It has been really helpful during my master's.

  • @saachigupta4545
    @saachigupta4545 Před 6 dny

    this is the best explanation i ever got

  • @jitendrakumar-vv8ho
    @jitendrakumar-vv8ho Před 10 měsíci

    The only channel where i found backtracking explained with code exactly 💯

  • @nagraj7569
    @nagraj7569 Před 11 měsíci +1

    I appreciate for your effort on flow chart. It's really helpful.

  • @manojgollapelli9856
    @manojgollapelli9856 Před rokem +1

    Thanks mam, your teaching style is next level.. Every thing is clear 👍😀

  • @tanmayn1984
    @tanmayn1984 Před měsícem +1

    excellent explanation, totally understood the sum, thankyou you for the lecture!

  • @ShubhamTamboli-g2g
    @ShubhamTamboli-g2g Před měsícem

    Best explanation ever seen.Kudos to your hardwork.

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

    you are just so perfect....i can understand no other explanation except your. You are just so perfect.

  • @vinayakreddy4954
    @vinayakreddy4954 Před 11 měsíci +1

    Your Explanation is really amazing..You are really underrated..Hope your channel becomes popular very soon..

  • @abhishekbhattacharyya2950

    correct code is easily available but proper flowchart of the recursive calls are not available everywhere. Thanks

  • @ajaybeldar4981
    @ajaybeldar4981 Před 5 měsíci

    Thank you so much , great and super easy explanation

  • @utsavaggrawal2697
    @utsavaggrawal2697 Před rokem +1

    very nice logic and explanation
    thanks a lot

  • @Ankit-s1h
    @Ankit-s1h Před měsícem

    best video for understanding recursion and backtracking

  • @asutoshbehera2259
    @asutoshbehera2259 Před 5 měsíci

    Very well explained.

  • @your_daddy_mf
    @your_daddy_mf Před 6 měsíci

    alisha i love you yrr 😭😭😭😭 your teaching skills are so good

  • @honestad3558
    @honestad3558 Před 3 měsíci

    your smile at the end tells that youwere satisfied with the video by the way great explanation

  • @k-universe0022
    @k-universe0022 Před 4 měsíci

    i m inspired bcz of u 💜 well done

  • @akgamers4290
    @akgamers4290 Před 9 měsíci +1

    nice explanation

  • @bytescoder
    @bytescoder Před 5 měsíci

    Woahh.Thats flowchart representation and explanation are pretty good to catch in one watch. You really made it easy
    Thankyou❤

  • @user-nv3eo1yi5g
    @user-nv3eo1yi5g Před rokem

    Thank u for providing easy and detailed explanation with short and understandable code.

  • @KarthikDances
    @KarthikDances Před 2 měsíci

    I really appreciate your thought process and way you explain ❤

  • @namangupta1373
    @namangupta1373 Před měsícem

    Thank you didi for this very easy explanation ❤

  • @JackCoderr
    @JackCoderr Před 3 měsíci

    thank you so much didi, best explaination ever

  • @MCA_himanshumehra
    @MCA_himanshumehra Před rokem +1

    your explanation was very easy and helpful .

  • @pathe6158
    @pathe6158 Před 4 dny

    Nice explanation ✨✨

  • @khushiramginnare4961
    @khushiramginnare4961 Před rokem

    Hi Alisha,
    I was trying to understand how recursion internal work, find correct bracket but now it's clear to me.
    Thanks a lot. Keep it up.!!

  • @kannathalasowmya1606
    @kannathalasowmya1606 Před 10 měsíci

    👌👌👌explained very very well thank you so much you explained very well

  • @BRSanush
    @BRSanush Před rokem +1

    Thank you so much

  • @nguyenbach4710
    @nguyenbach4710 Před rokem

    thank you very much plz don't stop i have watched more than 3 vids of your channel

  • @satyamgupta6030
    @satyamgupta6030 Před rokem

    thanks alot alisha I always check for ur videos whenever I get stuck.

  • @siddharth.chandani
    @siddharth.chandani Před rokem

    Now, I have came to know that I have problem in BACKTRAKING ...
    BTW Great Exp.

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

    Thank you Alishaa !!
    your explanation was very easy to digest .

  • @muhammadmohsin9997
    @muhammadmohsin9997 Před 4 měsíci

    Great

  • @harshitsharma5647
    @harshitsharma5647 Před 2 lety

    From Yesterdays I watched your helpful video!
    Thankyou for making very easy and understandable videos!

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

    that's an apt way to explain this , thanks a lot

  • @lokeshnaidu9324
    @lokeshnaidu9324 Před 9 dny

    Thanks Alisha didi

  • @soicooc3500
    @soicooc3500 Před 6 měsíci

    thanks , very details

  • @raghumca8285
    @raghumca8285 Před 2 lety

    awesome explanation easy to understand with flowchart

  • @nehanjalimanchikanti3974

    Oh my god ur just amazing

  • @t6652
    @t6652 Před rokem

    Thanks alot 🎉 helped me

  • @vivekswami2182
    @vivekswami2182 Před rokem +1

    very nice explanation love it !!

  • @RANJANKUMAR-bc1mw
    @RANJANKUMAR-bc1mw Před 2 lety +3

    code so simple but i diidn't get it .i mean i can't find out the backtracking step in this code

    • @siddharth.chandani
      @siddharth.chandani Před rokem

      Same goes for me 😅..
      BTW do you know how to improve this thing...
      really appreciate your suggestion..

  • @Veeru-qm4rg
    @Veeru-qm4rg Před rokem

    Fabulous explanation mam TQ so much 👏👏

  • @prasannapm3220
    @prasannapm3220 Před 2 lety

    Amazing thought process ,easy

  • @khaleelahmad9411
    @khaleelahmad9411 Před rokem

    More power to you girl.

  • @abhishekanand9451
    @abhishekanand9451 Před rokem

    mind blowing Explanation🙂🙂🙂🙂

  • @user-bg9vw4dn4e
    @user-bg9vw4dn4e Před 6 měsíci

    what an explanation wahhhh

  • @bonafontciel
    @bonafontciel Před rokem

    The time spent on the diagrams made me give you a like. Thanks!

  • @cinemuzirecords
    @cinemuzirecords Před 12 dny

    greatt

  • @joseph2073
    @joseph2073 Před rokem

    Great explanation and nice diagram mam. Thank you very much 🙏🏻
    Your channel is so underrated. I'd recommend you to do some podcasts with popular youtubers like striver, ridhhi, arsh goyal, keerti, etc etc.
    It'll bring more people to your channel.
    (Just an idea to gain popularity :))
    Hope you've a great day ma'am 🙏🏻🤗

  • @HarpreetSingh-pi1ki
    @HarpreetSingh-pi1ki Před rokem

    Great Explanation Mam

  • @sianwa11
    @sianwa11 Před 10 měsíci

    Thank you!

  • @gyaniyoda4608
    @gyaniyoda4608 Před 10 měsíci

    Thank you mam

  • @BRSanush
    @BRSanush Před rokem

    Thank youvso much

  • @banil636
    @banil636 Před 2 lety

    appriciate your efforts in making flow chat

  • @dinobandhuchakraborty5202

    thank you

  • @omkarwalve6292
    @omkarwalve6292 Před rokem

    thanks

  • @md_abdulrahman
    @md_abdulrahman Před měsícem

    Thanks!

  • @SirAkPandey
    @SirAkPandey Před rokem

    Awesome explanation. Thankyou!! 🙏🙏

  • @shristipurusarthi6675

    thankqqq sooo much for the wonderful explanation ma'am

  • @aswitha6065
    @aswitha6065 Před rokem

    very well explained tq but i didnt understand why we dindt pop back when we return plz reply i am so confused about this

  • @gameonhai5697
    @gameonhai5697 Před 2 lety

    You are a genius. Thanks

  • @pratyushvaibhav
    @pratyushvaibhav Před rokem +1

    it would be good if post those slides on any tlgrm channel , btw you explained through tree before proceeding to code , this is the best approach for recursion problems.

  • @vasanthanv6143
    @vasanthanv6143 Před rokem

    Very good explaination

  • @SomneelMaity
    @SomneelMaity Před 2 lety

    Thank You Very Much. It was really helpful.

  • @srinivasjakhar
    @srinivasjakhar Před rokem

    Good explanation thank you..

  • @mdimranhosen6674
    @mdimranhosen6674 Před 2 lety

    Great Explanation.💝

  • @nehasht2
    @nehasht2 Před 2 lety

    Love ur explanations...

  • @user-ks7qs9lm9b
    @user-ks7qs9lm9b Před 2 lety

    I learned alot,Thank you mam

  • @barathnatarajan8566
    @barathnatarajan8566 Před 2 lety

    Beautiful explanation

  • @naturesrevolution
    @naturesrevolution Před 12 dny

    WHAT IS SPACE AND TIME COMPLEXITY OF THIS SOLUTION?...

  • @arukshasilvie
    @arukshasilvie Před 2 lety

    Your videos are really awesome.

  • @user-im6qz9nh7w
    @user-im6qz9nh7w Před rokem

    Graciasss helped a lottt

  • @supriyadas7972
    @supriyadas7972 Před 5 měsíci

    If someone explain me the base case of this code if(curr_str()==n*2 this piece of line

  • @Codistency
    @Codistency Před 3 lety

    nice video...was looking for a similar tree.

  • @praneethadevimudunuri3153

    CAN ANYONE TELL ME WHY THIS WAS NOT WORKING................
    class Solution {
    public void paranthesis(String str,int n,int open,int close,List al){
    if(open == n && close == n){
    al.add(str);
    return;
    }
    if(open < n){
    str = str + "(";
    paranthesis(str,n,open+1,close,al);
    }
    if(close < open){
    str = str + ")";
    paranthesis(str,n,open,close+1,al);
    }
    }
    public List generateParenthesis(int n) {
    List al = new ArrayList();
    paranthesis("",n,0,0,al);
    return al;
    }
    }
    OUTPUT THAT I GOT:
    ["((()))","((()())","((()()()","(()(())","(()(()()"]

  • @tarushidubey2973
    @tarushidubey2973 Před 6 měsíci

    💗💫

  • @vibhavsharma2724
    @vibhavsharma2724 Před 2 lety

    Very helpful thank you 🙏

  • @joyjain3111
    @joyjain3111 Před rokem +2

    time and space complexity>?

    • @NitinPeace
      @NitinPeace Před rokem +1

      Both time and space complexity are O(n)

  • @sushantagawane8683
    @sushantagawane8683 Před 2 lety

    Didi just amazing explanation ever given. Continue giving such nice explanations. Wonderful !!! Didi, did u also post answers to the leetcode contest questoins ???

  • @chitranshsaxena59
    @chitranshsaxena59 Před rokem

    Can someone help in explaining the time complexity here? And some detailed way of calculating that?

  • @mayanksaxena7864
    @mayanksaxena7864 Před 2 dny

    Solved by your logic , watched till 4:56 only

  • @subhajitghosh8349
    @subhajitghosh8349 Před 2 lety

    nice video

  • @surajkumarsingh5305
    @surajkumarsingh5305 Před 2 lety

    Thanks !!

  • @AltafHussain-eq6ot
    @AltafHussain-eq6ot Před 2 lety

    Awesome explanation keep it up I want to connect with u for coding practice.

    • @AltafHussain-eq6ot
      @AltafHussain-eq6ot Před 2 lety

      I have my Amazon sde 1 interview on Monday iam very much nervous need your help

  • @_ayush_oswal
    @_ayush_oswal Před rokem

    excellent explanation, but isn't using pop_back function necessary ??

    • @dhruvmittal8018
      @dhruvmittal8018 Před rokem

      same question here if you got the answer would you plz explain it to me

  • @pragatiagrawal201
    @pragatiagrawal201 Před 2 lety

    I loved the video and understood it completely but the approach that striked my brain was the thumbnail of this video... Anybody here who knows how we can write the code of that approach present in thumbnail....??

  • @monikaraut5266
    @monikaraut5266 Před rokem +2

    Awesome explanation 🙌
    I also came up with the same recursion tree as in the thumbnail, Wanted to know if it is possible to solve the problem with that approach ?

  • @piyushsingh-ue9xd
    @piyushsingh-ue9xd Před rokem

    can you share this flow chart

  • @aditigupta6870
    @aditigupta6870 Před 5 měsíci

    You are very clear and cute

  • @kailashmaurya6528
    @kailashmaurya6528 Před 5 měsíci

    fannnnnnnnnnnnnnnnnnnnnnnnnnn

  • @silviusyt
    @silviusyt Před rokem

    code?

  • @goldentime4910
    @goldentime4910 Před 6 měsíci

    aap hindi me padha lete to aur bahtrin samajh me aata
    maximum janta hindi wali hoti hai

  • @aykay20
    @aykay20 Před rokem

    Thank You!