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

Поделиться
HTML-код
  • Опубликовано: 12 сен 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: ["()"]

Комментарии • 105

  • @parth_3856
    @parth_3856 5 месяцев назад +7

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

  • @user-vw9hl5qr8x
    @user-vw9hl5qr8x Год назад +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 6 месяцев назад +2

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

  • @yashjobalia
    @yashjobalia 8 месяцев назад +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.

  • @vinayakreddy4954
    @vinayakreddy4954 11 месяцев назад +1

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

  • @jitendrakumar-vv8ho
    @jitendrakumar-vv8ho 10 месяцев назад

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

  • @manojgollapelli9856
    @manojgollapelli9856 Год назад +1

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

  • @nishakumari649
    @nishakumari649 2 года назад +1

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

  • @bytescoder
    @bytescoder 6 месяцев назад

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

  • @honestad3558
    @honestad3558 3 месяца назад

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

  • @nagraj7569
    @nagraj7569 11 месяцев назад +1

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

  • @khushiramginnare4961
    @khushiramginnare4961 Год назад

    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.!!

  • @ShubhamTamboli-g2g
    @ShubhamTamboli-g2g Месяц назад

    Best explanation ever seen.Kudos to your hardwork.

  • @tanmayn1984
    @tanmayn1984 Месяц назад +1

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

  • @saichaithrik7134
    @saichaithrik7134 2 месяца назад

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

  • @your_daddy_mf
    @your_daddy_mf 6 месяцев назад

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

  • @nguyenbach4710
    @nguyenbach4710 Год назад

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

  • @user-nv3eo1yi5g
    @user-nv3eo1yi5g Год назад

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

  • @utsavaggrawal2697
    @utsavaggrawal2697 Год назад +1

    very nice logic and explanation
    thanks a lot

  • @saachigupta4545
    @saachigupta4545 12 дней назад

    this is the best explanation i ever got

  • @Ankit-s1h
    @Ankit-s1h Месяц назад

    best video for understanding recursion and backtracking

  • @KarthikDances
    @KarthikDances 3 месяца назад

    I really appreciate your thought process and way you explain ❤

  • @k-universe0022
    @k-universe0022 4 месяца назад

    i m inspired bcz of u 💜 well done

  • @vaibhavgupta973
    @vaibhavgupta973 2 года назад +1

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

  • @abhishekbhattacharyya2950
    @abhishekbhattacharyya2950 Год назад +1

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

  • @harshitsharma5647
    @harshitsharma5647 2 года назад

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

  • @ajaybeldar4981
    @ajaybeldar4981 5 месяцев назад

    Thank you so much , great and super easy explanation

  • @satyamgupta6030
    @satyamgupta6030 Год назад

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

  • @MCA_himanshumehra
    @MCA_himanshumehra Год назад +1

    your explanation was very easy and helpful .

  • @bonafontciel
    @bonafontciel Год назад

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

  • @kannathalasowmya1606
    @kannathalasowmya1606 10 месяцев назад

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

  • @joseph2073
    @joseph2073 Год назад

    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 🙏🏻🤗

  • @pathe6158
    @pathe6158 11 дней назад

    Nice explanation ✨✨

  • @namangupta1373
    @namangupta1373 Месяц назад

    Thank you didi for this very easy explanation ❤

  • @akgamers4290
    @akgamers4290 9 месяцев назад +1

    nice explanation

  • @JackCoderr
    @JackCoderr 3 месяца назад

    thank you so much didi, best explaination ever

  • @asutoshbehera2259
    @asutoshbehera2259 5 месяцев назад

    Very well explained.

  • @siddharth.chandani
    @siddharth.chandani Год назад

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

  • @BRSanush
    @BRSanush Год назад +1

    Thank you so much

  • @kingoftypos11
    @kingoftypos11 7 месяцев назад

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

  • @sushantagawane8683
    @sushantagawane8683 2 года назад

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

  • @raghumca8285
    @raghumca8285 2 года назад

    awesome explanation easy to understand with flowchart

  • @vivekswami2182
    @vivekswami2182 Год назад +1

    very nice explanation love it !!

  • @khaleelahmad9411
    @khaleelahmad9411 Год назад

    More power to you girl.

  • @muhammadmohsin9997
    @muhammadmohsin9997 4 месяца назад

    Great

  • @nehanjalimanchikanti3974
    @nehanjalimanchikanti3974 Год назад

    Oh my god ur just amazing

  • @prasannapm3220
    @prasannapm3220 2 года назад

    Amazing thought process ,easy

  • @abhishekanand9451
    @abhishekanand9451 Год назад

    mind blowing Explanation🙂🙂🙂🙂

  • @Veeru-qm4rg
    @Veeru-qm4rg Год назад

    Fabulous explanation mam TQ so much 👏👏

  • @soicooc3500
    @soicooc3500 7 месяцев назад

    thanks , very details

  • @aswitha6065
    @aswitha6065 Год назад

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

  • @pratyushvaibhav
    @pratyushvaibhav Год назад +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.

  • @banil636
    @banil636 2 года назад

    appriciate your efforts in making flow chat

  • @shristipurusarthi6675
    @shristipurusarthi6675 Год назад

    thankqqq sooo much for the wonderful explanation ma'am

  • @SirAkPandey
    @SirAkPandey Год назад

    Awesome explanation. Thankyou!! 🙏🙏

  • @lokeshnaidu9324
    @lokeshnaidu9324 16 дней назад

    Thanks Alisha didi

  • @t6652
    @t6652 Год назад

    Thanks alot 🎉 helped me

  • @user-bg9vw4dn4e
    @user-bg9vw4dn4e 6 месяцев назад

    what an explanation wahhhh

  • @HarpreetSingh-pi1ki
    @HarpreetSingh-pi1ki Год назад

    Great Explanation Mam

  • @RANJANKUMAR-bc1mw
    @RANJANKUMAR-bc1mw 2 года назад +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 Год назад

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

  • @SomneelMaity
    @SomneelMaity 2 года назад

    Thank You Very Much. It was really helpful.

  • @gameonhai5697
    @gameonhai5697 2 года назад

    You are a genius. Thanks

  • @mdimranhosen6674
    @mdimranhosen6674 2 года назад

    Great Explanation.💝

  • @sianwa11
    @sianwa11 10 месяцев назад

    Thank you!

  • @naturesrevolution
    @naturesrevolution 18 дней назад

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

  • @md_abdulrahman
    @md_abdulrahman Месяц назад

    Thanks!

  • @BRSanush
    @BRSanush Год назад

    Thank youvso much

  • @srinivasjakhar
    @srinivasjakhar Год назад

    Good explanation thank you..

  • @gyaniyoda4608
    @gyaniyoda4608 11 месяцев назад

    Thank you mam

  • @Tahzeeb-v4e
    @Tahzeeb-v4e 2 года назад

    I learned alot,Thank you mam

  • @vasanthanv6143
    @vasanthanv6143 Год назад

    Very good explaination

  • @omkarwalve6292
    @omkarwalve6292 Год назад

    thanks

  • @dinobandhuchakraborty5202
    @dinobandhuchakraborty5202 Год назад

    thank you

  • @nehasht2
    @nehasht2 2 года назад

    Love ur explanations...

  • @Codistency
    @Codistency 3 года назад

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

  • @cinemuzirecords
    @cinemuzirecords 19 дней назад

    greatt

  • @monikaraut5266
    @monikaraut5266 Год назад +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 ?

  • @mayanksaxena7864
    @mayanksaxena7864 8 дней назад

    Solved by your logic , watched till 4:56 only

  • @user-im6qz9nh7w
    @user-im6qz9nh7w Год назад

    Graciasss helped a lottt

  • @arukshasilvie
    @arukshasilvie 2 года назад

    Your videos are really awesome.

  • @tarushidubey2973
    @tarushidubey2973 7 месяцев назад

    💗💫

  • @barathnatarajan8566
    @barathnatarajan8566 2 года назад

    Beautiful explanation

  • @_ayush_oswal
    @_ayush_oswal Год назад

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

    • @dhruvmittal8018
      @dhruvmittal8018 Год назад

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

  • @joyjain3111
    @joyjain3111 Год назад +2

    time and space complexity>?

    • @NitinPeace
      @NitinPeace Год назад +1

      Both time and space complexity are O(n)

  • @vibhavsharma2724
    @vibhavsharma2724 2 года назад

    Very helpful thank you 🙏

  • @supriyadas7972
    @supriyadas7972 5 месяцев назад

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

  • @chitranshsaxena59
    @chitranshsaxena59 Год назад

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

  • @piyushsingh-ue9xd
    @piyushsingh-ue9xd Год назад

    can you share this flow chart

  • @surajkumarsingh5305
    @surajkumarsingh5305 2 года назад

    Thanks !!

  • @AltafHussain-eq6ot
    @AltafHussain-eq6ot 2 года назад

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

    • @AltafHussain-eq6ot
      @AltafHussain-eq6ot 2 года назад

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

  • @kailashmaurya6528
    @kailashmaurya6528 6 месяцев назад

    fannnnnnnnnnnnnnnnnnnnnnnnnnn

  • @praneethadevimudunuri3153
    @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:
    ["((()))","((()())","((()()()","(()(())","(()(()()"]

  • @subhajitghosh8349
    @subhajitghosh8349 2 года назад

    nice video

  • @pragatiagrawal201
    @pragatiagrawal201 2 года назад

    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....??

  • @aditigupta6870
    @aditigupta6870 5 месяцев назад

    You are very clear and cute

  • @silviusyt
    @silviusyt Год назад

    code?

  • @goldentime4910
    @goldentime4910 7 месяцев назад

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

  • @aykay20
    @aykay20 Год назад

    Thank You!