Re 5. Multiple Recursion Calls | Problems | Strivers A2Z DSA Course

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 352

  • @auroshisray9140
    @auroshisray9140 3 роки тому +243

    I was indecisive with recursion for last 2 years.... Finally, finally i would say....i can understand recursion

  • @user-fw4kz3bb4g
    @user-fw4kz3bb4g Рік тому +116

    too good bro, learning 1st sem topic in 6th sem, but its never too late when people like you are there by our side

    • @parth6661
      @parth6661 3 місяці тому +2

      bro accept the reality you are late... I am doing this thing in 7th sem 🫠🙂. And what about your placements? did you got it?

    • @user-fw4kz3bb4g
      @user-fw4kz3bb4g 3 місяці тому

      @@parth6661 got 13LPA company 10 days back brother, hadn't it been for striver or his dp playlist, I wouldn't even think of cracking it. Striver is literally GOD for tier 3 students like me

    • @user-fw4kz3bb4g
      @user-fw4kz3bb4g 3 місяці тому

      @@parth6661 just believe in yourself and striver. You will crack a great company in few months time

    • @user-fw4kz3bb4g
      @user-fw4kz3bb4g 3 місяці тому +14

      @@parth6661 my comment got deleted. I landed a 13lpa job on campus brother, just 10 days back. Hadn't it been striver or his dp playlist, I wouldn't be where I am. Trust the process and grind it, you WILL make it.

    • @surajnimbalkar9283
      @surajnimbalkar9283 3 місяці тому

      ​@@user-fw4kz3bb4ghow much enough from this series?

  • @nileshsinha7869
    @nileshsinha7869 3 роки тому +91

    This is just gem like i've watched don't know how many recursion videos from basic but this is the one i needed. The pace of this series is great. Great work striver as always❤❤

  • @allenalex4861
    @allenalex4861 2 роки тому +163

    I wish I discovered your channel a bit earlier. Amazing content Bhai keep going.

    • @abc-ym4zs
      @abc-ym4zs Рік тому +14

      which year bro literally i found his channel in 4 sem it is really very helping to build the intution without him i even cant imagine how poor will be my problem solving skills

  • @rohitbagadi3058
    @rohitbagadi3058 2 роки тому +20

    Fibonacci series using recursion in JavaScript -
    function fib(n) {
    if (n

  • @iitimunda
    @iitimunda 5 місяців тому +5

    00:01 Learn about multiple recursion calls
    02:10 Recursion is used to find the nth fibonacci number.
    04:21 In multiple recursion calls, the recursion calls are executed one by one and not simultaneously.
    08:33 Recursive calls for solving problems
    10:40 Recursion tree is vertical and executed in a specific order
    12:49 Understanding multiple recursion calls in programming
    14:55 The time complexity is near about two to the power n, which is generally known as exponential in nature.

  • @shauryatuli2241
    @shauryatuli2241 3 роки тому +29

    I thought I was at least decent in recursion basics before watching these videos... even after watching so many videos on recursion ... learned a lot ... thanks Bhaiya ❤

  • @Rajesh-fj5hm
    @Rajesh-fj5hm Місяць тому +2

    The way he teaches every concept is just phenomenol. Really loved it!! Thank you so so much striver....

  • @namansharma5128
    @namansharma5128 3 роки тому +21

    10:34 striverr bhaiya spotted watching CANDY. 😂😂 . Thanks bhaiya for all the hard work u r doing for us.

    • @LearnerAbhi21
      @LearnerAbhi21 6 місяців тому +2

      the rage of rudrakund S1E3

  • @ajayramola9386
    @ajayramola9386 2 роки тому +6

    a true teacher who is passionate towards teaching watched a couple of vids but never understood recursion, thanks again striver

  • @akshayzade9761
    @akshayzade9761 Рік тому +9

    Horizontal approach was length but you nailed it.. Because till now I have seen ppl writing vertical and for me it was tough to trace but since you taught horizontal approach its way easy for me to understand vertical onwards
    Thanks for efforts Striver 🙂

  • @rohan8758
    @rohan8758 10 місяців тому +1

    Hey Striver, this is awesome recursion series i found on you tube to learn recursion in depth So i will get help in solving trees, graph & DP problems. Thanks for your dedication towards free quality education to us.

  • @abhicodes34
    @abhicodes34 Місяць тому

    I have gone through many videos on youtube, but after watching this I understood how multiple recursion works.
    Thankyou!

  • @shubhamagarwal1434
    @shubhamagarwal1434 5 місяців тому +5

    #Free Education For All... # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this..."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India..

  • @user-bt6mh9ez3u
    @user-bt6mh9ez3u 2 роки тому +3

    oh my god..such a mindblowing explanation...i had zero knowledge on recusrion..when i tried coding any recursion questions i couldn't code at all..but after watching your videos i am finally able to solve it..thanks a lot bhaiya

  • @hemantkumar2585
    @hemantkumar2585 2 роки тому +3

    thankyou for making such content, i have watch many video but when i watch this playlist actully i understand how recursion work

  • @AbhinavAnand-r9c
    @AbhinavAnand-r9c Рік тому +1

    I was struggling since morning for this internal working and nowhere got good explanation. You are a boon to coders community man!! huge respect!

  • @adarshvaranasi1684
    @adarshvaranasi1684 3 роки тому +14

    Actually I don't understand the recursion tree before, but after watching this video now I understood how much it's helpful and also one more thing now I can understand the time complexity tooo

    • @prafullaraichurkar4369
      @prafullaraichurkar4369 8 місяців тому

      Rightly said, it does play a role in helping visualize time complexity.

  • @jinhuang7258
    @jinhuang7258 Рік тому +2

    This Recursion playlist is the best! Thank you!

  • @SoyUnManco0
    @SoyUnManco0 2 дні тому

    Im starting to learn competitive programming and you help me a lot in this way. Thank you bro !

  • @tigers4278
    @tigers4278 Рік тому

    to my engineering of 4 yrs learning so many coding chaneels n not even commented for single time n this is first time wt iam commenting n i shud comment for shure bcz ur wonderfull buddy all the best ,u r capable for gold medal for mking understanding anyone tq

  • @Khush-f6s
    @Khush-f6s 7 місяців тому

    Really found it helpful .First I used to feel like afraid of recursion ...but now I am able to solve it ... Thankyou so much

  • @juniorboy1903
    @juniorboy1903 3 роки тому +2

    Bhaiya hume itna depth me kisi ne nhi samjhaya include college teacher thanks bhaiya😀

  • @kanyapandey
    @kanyapandey Рік тому

    Thank you so much Striver
    I have now understood how to debug multiple recursive method 👏👏👏👏 GOD bless you!!!

  • @samuelabbott931
    @samuelabbott931 8 місяців тому

    Ah, very good, dang, thanks!!! I was confused on the order. This is excellent and makes perfect sense

  • @mehaksharma9391
    @mehaksharma9391 Рік тому

    thank you striver for explaining the multiple recursion so well....blessed that i came to know about your channel

  • @vanshsethi8591
    @vanshsethi8591 2 роки тому +1

    This is the best recursion video I have ever watched ; thank you so much for clearing my doubt

  • @Rohitsharma-tq3ye
    @Rohitsharma-tq3ye Рік тому +1

    Best explanation I found on recursion so far👍

  • @kallabhargavi-d7j
    @kallabhargavi-d7j 10 місяців тому

    def sample(n):
    if n

  • @lalitbisht8381
    @lalitbisht8381 9 місяців тому +1

    Amazing I'm understanding recursion very clearly 🔥

  • @welcometoc.s.easpirants
    @welcometoc.s.easpirants 9 місяців тому

    You Rock Man. I am not commented in any video till now this is the first video where i can,t go without comment. Amazing Explaination.

  • @rumiNITPatna
    @rumiNITPatna 5 місяців тому

    u made recursion so easy ! thank u so much striver

  • @Manishgupta200
    @Manishgupta200 2 роки тому

    Thankyou striver for making such an amazing video. Now, I can easily write multiple recursive function algorithm for most of the any AP series with the help of this tutorial video.

  • @dilipsunar99
    @dilipsunar99 3 роки тому +16

    I was able to do recursion problem from before too but didn't know the internal working of it but this video helped me understand that too.
    Thank you sir.

    • @p33_harsh59
      @p33_harsh59 3 роки тому +2

      that is very true!
      it was just like roting!

    • @GULLAPUDILIKITHBCE
      @GULLAPUDILIKITHBCE 2 роки тому +1

      without knowing internal working how can you do problems?(by remembering???)

    • @bravo2992
      @bravo2992 11 місяців тому

      this is exactly what happens in colleges, rote learning@@GULLAPUDILIKITHBCE

  • @gunasekarb3100
    @gunasekarb3100 7 місяців тому +19

    i understood how this works.. But I want to know how could I have an intuition to use this multiple recursion for my problem..How could I know whether my problem requires multiple recursions or not?... This functional recursion is like backtracking. We have to think in reverse order.. Is human brain that much capable?...

    • @immortalgaming4392
      @immortalgaming4392 5 місяців тому +3

      U can use multiple recursion in ds trees and graph topcs

  • @dyuanhu6143
    @dyuanhu6143 10 місяців тому

    best recursion topic even seen, thanks!!!

  • @aadharshr7025
    @aadharshr7025 2 роки тому

    I just love your videos. They deserve a lot more ! I just like and then only start seeing the video as Im sure there arent any chances that I dont understand it...

  • @sahilanand30
    @sahilanand30 2 роки тому +4

    Finally i can understand the recursion 😊

  • @-kunchalaAjay
    @-kunchalaAjay 2 місяці тому

    after many videos 🙏🥲❤️💯🫠 understood recursion tq u

  • @bravo2992
    @bravo2992 11 місяців тому

    Thank you so much for this series! Helped a lot..❤❤❤

  • @studynewthings1727
    @studynewthings1727 Рік тому

    Thankyou STRIVER, I have made a directory of your name and I have folders in that of different playlist you have explained. I have understood Multiple Recursion Calls.

  • @poojaraman6663
    @poojaraman6663 7 місяців тому

    Thank u so much sir🙂
    This video has explained me multiple recursion calls very clearly...Friends explained multiple times but I didn't have a clarity. Finally i understood wt is happening 🥲

  • @deepikakumar8369
    @deepikakumar8369 Рік тому

    Thanks Striver. Your explanation is too good to be true

  • @AdityaAgrawal-fi7np
    @AdityaAgrawal-fi7np 4 місяці тому

    recursion was skiped by me several times but ,hear I hit the base case and return true thanx aditya

  • @darshanakv4946
    @darshanakv4946 9 місяців тому

    I have always felt recursion the most toughest in dsa..but not anymore after watching this recursion series!!

  • @Unstoppable.Sakshi
    @Unstoppable.Sakshi Рік тому

    Amazing A TO Z SDE sheet . I am following that reached here because of you . ❤

  • @its_neel_ok
    @its_neel_ok 2 роки тому +3

    i did this -- each and every time you give a question and i try to solve it my self and see whether i could or not! and this really helped, and before starting the video again i say in the comment :) sometime i see i use more variables and i learn that the question could be done using less variables. thanks for the series, btw i was going to learn dp but sir u said to first watch the recursing series at least 10 lectures, and here i am 😂
    int fib(int n){
    if(n==1) return 0;
    else if(n==2) return 1;
    else
    return fib(n-1) + fib(n-2);

    }
    int n;cin>>n;
    cout

  • @abhaymishra8486
    @abhaymishra8486 Рік тому

    very good video, i got very good understanding of recursion tree.

  • @AshwaniKumar-ew1cn
    @AshwaniKumar-ew1cn 25 днів тому

    Tooo good to understand, explaination was cc!

  • @ritikshandilya7075
    @ritikshandilya7075 10 місяців тому +1

    bhai ne concept hi hila dala , Thanks @striver bro

  • @riz_ahmeds
    @riz_ahmeds 3 місяці тому

    I was looking for this explanation. Thanks buddy.

  • @preethamreddy9610
    @preethamreddy9610 Місяць тому

    Understood. Today is November 29th, 2024 and i have just completed watching this video. I will come here periodically to update my status and my offers! Wish me luck!

  • @alijawadhussaingorayya2074
    @alijawadhussaingorayya2074 Рік тому

    Bohat he alaaa ostad g Never Seen Explainaoin easier han this

  • @NIRAJ-bu2hp
    @NIRAJ-bu2hp Рік тому +1

    thankyou for all the videos , video is just awesome🔥🔥🔥

  • @riiittesshh
    @riiittesshh Рік тому

    Loved it Striver.Thank You💖💖

  • @SnehaDas-o2k
    @SnehaDas-o2k 3 місяці тому

    understood every bit of it. Thank you sir!

  • @Sumanth_Siddareddy
    @Sumanth_Siddareddy 5 місяців тому

    Understood. Thank You Striver

  • @sarder681
    @sarder681 10 місяців тому

    striver you are simply great.but there is a simple math formula to get 'n ' th fibonacci number which is called Binet's formula here we go------f(n)=(1+root symbool 5)^n - (1-root symbol 5)^n/2^n root symbol 5

  • @mohitzen
    @mohitzen 2 роки тому +3

    What!! I today got to know it's fibonachi. All these times i've pronounced it as fibonaki and noone corrected me either.. thanks:)

  • @zuhaibamjad7668
    @zuhaibamjad7668 Рік тому

    Thank you so much bro. aaj aap ne recursion smjha di

  • @santosharakere
    @santosharakere 9 місяців тому

    Thank you. Great explanation of recursion Tree.

  • @ellenlinlin
    @ellenlinlin 2 роки тому +1

    thank you for the wonderful class!

  • @thejagadeshwaran
    @thejagadeshwaran Місяць тому

    Mind Blowing fibonaccci recursion

  • @chakalivinith6178
    @chakalivinith6178 2 роки тому

    Python Solutions for above questions:
    Fibonacci Series:
    iterative approach for first n series
    n = 5
    first = 0
    second = 1
    for i in range(n):
    print(first)
    temp = first
    first = second
    second = temp + second //
    iterative approach for nth term
    def fibo(n):
    first, second= 0,1
    if n == 0 :
    print(first)
    elif n == 1:
    print(second)
    for i in range(2,n+1):
    result = first + second
    first = second
    second = result
    print(result)
    n = 6
    fibo(n) //
    def fib(n, dp=[0, 1]):
    for i in range(len(dp), n + 1):
    dp += [dp[i - 1] + dp[i - 2]]
    return dp[n]
    n = 6
    print(fib(n,dp=[0,1])) //
    fib = [0,1]
    n = 7
    for i in range(2,n+1):
    fibo = fib[i-1] + fib[i-2]
    fib.append(fibo)
    print(fib) # n series (loop should be 2, n)
    print(fib[n]) // # nth term
    Recursion approach for nth term
    def fibo(n):
    if n

  • @FaisalMasood-q6g
    @FaisalMasood-q6g 5 місяців тому

    Nice gesture and explanation.

  • @utsavseth6573
    @utsavseth6573 Рік тому

    Great effort by Raj in explaining.

  • @Lullurluli
    @Lullurluli Рік тому +3

    I wanted to take a moment to express my sincere appreciation for your invaluable assistance. You've truly been a guiding light in helping me connect the dots that seemed elusive before.

  • @RailExpressbyPreetam
    @RailExpressbyPreetam 5 місяців тому

    Godlevel explanation ❤

  • @DevashishJose
    @DevashishJose Рік тому

    understood. Thanks for your hard work.

  • @helloworldkhalid
    @helloworldkhalid 2 роки тому +1

    thankyou Striver bro thankyou so much❤❤

  • @sumitsanu9524
    @sumitsanu9524 2 роки тому

    its an amazing playlist for recursion

  • @changed217
    @changed217 Рік тому

    Thank you for this amazing lecture.

  • @savanrathod6021
    @savanrathod6021 Рік тому

    thank you dude this what i exactly needed

  • @nice_random_guy5347
    @nice_random_guy5347 8 днів тому

    Understood, thank you!

  • @yashkhatwani3198
    @yashkhatwani3198 2 роки тому +2

    Amazing , Super explanation

  • @bhushandharne8827
    @bhushandharne8827 9 місяців тому

    best instructor

  • @darshankalathiya8667
    @darshankalathiya8667 2 роки тому

    very very good contain bhaiyajiiii.. Thank UU : )

  • @anusha3598
    @anusha3598 5 місяців тому

    i wish i saw ur vidoes earlier! you're really cool. will share the word

  • @omkar_vishwakarma
    @omkar_vishwakarma Місяць тому

    hi striver, was testing time taken for each,
    and got to know that recursion is very very slower , compare to while,
    where exactly this recursion is used in real life problems?
    check output below:
    46
    while ans:1836311903
    Time measured for while: 0.00083 seconds.
    recussive ans:1836311903
    Time measured for recursion: 11.47690 seconds.

  • @amansinghal4663
    @amansinghal4663 2 роки тому +1

    paused the video in the middle, pressed the like button, then resumed.

  • @nimsguy
    @nimsguy 2 роки тому

    You make this shit a cake bro...well done!...

  • @tdx_jiggle7
    @tdx_jiggle7 Рік тому

    nice explanation no one explained recursion in such a good way on u tube

  • @dipeshburnwal2267
    @dipeshburnwal2267 2 роки тому +1

    fibonacci series using recursion in java
    public class Main
    {
    public static int fib(int n){
    if(n

  • @tempregex8520
    @tempregex8520 2 роки тому +4

    Thank you, can you or anyone in here tell me in which of your videos do you explain a recursive call INSIDE a loop(for loops in particular)? I somehow get lost in tracing the call, really appreciate your work!

  • @mohangc2414
    @mohangc2414 Рік тому

    Time complexity is golden ratio of n .Its not O(2^n).the complexity of fibonacci is O(Fn) = O(ϕn). This is approximately O(1.618n).

  • @sarangkumarsingh7901
    @sarangkumarsingh7901 Рік тому

    Awesome Sir...............

  • @AnujTiwari-g8o
    @AnujTiwari-g8o 7 місяців тому

    great work you are doing ..

  • @HarshitMalang
    @HarshitMalang 3 місяці тому

    the best dsa series

  • @ayushagarwal9626
    @ayushagarwal9626 2 роки тому

    Thank's brother It's very helpful

  • @krishnakanttiwari517
    @krishnakanttiwari517 20 днів тому +1

    Thank You So Much Sir

  • @AsimJamil.
    @AsimJamil. 4 місяці тому

    understood well. to the point

  • @Cool96267
    @Cool96267 3 роки тому +38

    Hey Striver, Could you also please attach the link of the respective leetcode questions?

  • @sagaravhad5198
    @sagaravhad5198 Рік тому

    You are awesome bro. thank you so much.

  • @ABHAEY27
    @ABHAEY27 7 місяців тому

    best DSA ever seen

  • @ganeshv045
    @ganeshv045 2 роки тому

    Understood , super explanation

  • @adityabedi266
    @adityabedi266 7 днів тому

    14-01-2025 complete this topic learn a lot about multi function recursion. Thanks sir 😊

  • @radharamamohanakunnattur3035
    @radharamamohanakunnattur3035 2 роки тому

    Understood, awesome explanations provided by you. Have watched a most off DP series they're all, each one of them exceptional. Thank you ffor this!!

  • @praveenrajt4609
    @praveenrajt4609 2 місяці тому

    Thank you for your effort in teaching recursion. I just have one question: since 0 is the first number in the Fibonacci series, shouldn’t f(1) return 0?

  • @meghana8892
    @meghana8892 2 роки тому

    I was struggling understanding multiple recursion , I have tried python tutor, turbo c what not, but failed understanding it . Thank you for this video

  • @NazeerBashaShaik
    @NazeerBashaShaik 10 місяців тому

    Understood, thank you.