This is a Better Way to Understand Recursion

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

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

  • @cruzchaps3662
    @cruzchaps3662 6 месяцев назад +52

    Bro gave us the inception example and i thought he was going to explain it differently, then boom fibo is back

  • @danieldyson2754
    @danieldyson2754 8 месяцев назад +61

    In your next video, could you please explain recursion?

    • @sagarshah5341
      @sagarshah5341 7 месяцев назад +1

      In your next video, could you please explain recursion?

    • @marcusantenor793
      @marcusantenor793 7 месяцев назад +1

      @@sagarshah5341In your next video, could you please explain recursion?

    • @Shubham-fo7ug
      @Shubham-fo7ug 6 месяцев назад +1

      ​@@marcusantenor793 In your next video, could you please explain recursion?

    • @seanwhitty3218
      @seanwhitty3218 4 месяца назад +5

      @@Shubham-fo7ug if explanation is null return recursion explanation

    • @theghost7537
      @theghost7537 17 часов назад

      @@seanwhitty3218 In your next video, could you please explain recursion?

  • @ladro_magro5737
    @ladro_magro5737 6 месяцев назад +71

    bro said ‘this is a better way to understand recursion’ and proceed not to explain anything useful

    • @larsybarz
      @larsybarz 4 месяца назад +11

      The recursive joke here is that this is just like any other explanation of recursion

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

      he explains everything like a magic

    • @alexhyettdev
      @alexhyettdev  2 месяца назад +36

      Maybe try this video instead ruclips.net/video/Q83nN97LVOU/видео.html

    • @shafaitahir4728
      @shafaitahir4728 Месяц назад +3

      bro said ‘this is a better way to understand recursion’ and proceed not to explain anything useful

    • @noorg9658
      @noorg9658 3 дня назад

      @@alexhyettdevrecursing to understand recursion

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

    You just told the surface level information/definition. I was hoping you would help develop an intuition for recursion

  • @ikroac
    @ikroac Год назад +112

    To understand recursion you need to understand recursion first 😮‍💨

    • @alexhyettdev
      @alexhyettdev  Год назад +31

      To understand recursion you need to understand recursion first 😮‍💨

    • @douglasmasho2324
      @douglasmasho2324 Год назад +12

      @@alexhyettdev To understand recursion you need to understand recursion first 😮‍💨

    • @garryanderson9831
      @garryanderson9831 Год назад +11

      @@douglasmasho2324 To understand recursion you need to understand recursion first 😮‍💨

    • @JoaoVictor-vd9fn
      @JoaoVictor-vd9fn Год назад

      @@garryanderson9831 To understand recursion you need to understand recursion first 😮‍💨

    • @aswina646
      @aswina646 8 месяцев назад +8

      ​@@alexhyettdev To understand recursion you need to understand recursion first.

  • @kyomdonalddogo5775
    @kyomdonalddogo5775 9 месяцев назад +2

    I dont understand recursion, esp how many times to call it or what operator to use it with. I honestly thank God for loops

  • @jinyoung-ch
    @jinyoung-ch 11 месяцев назад +17

    Wow, stumbled upon this video and floored by the quality of the explanation and inception analogy. Thank you so much!

    • @alexhyettdev
      @alexhyettdev  10 месяцев назад +2

      Thank you! I am glad you liked it.

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

    I think it's less intuitive to write the fibonacci function using a single base case of n

  • @constiskey-fb7sl
    @constiskey-fb7sl 19 дней назад

    That is fascinating that for the fibonachi series, recursion is less efficient, while quick sort is amazing.

  • @Michael-Mosca
    @Michael-Mosca Месяц назад

    recursion is SO GODLY POWERFUL in the right cases

  • @WiggyPineda-eg3gb
    @WiggyPineda-eg3gb 8 месяцев назад +3

    thank you so much! I loved the analogy, it really helped and now I must go watch inception again. Ive had a hard time wrapping my head aroound python, I mean I ace my classes so that must mean I understand it right? it just feels like Im not getting it.

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

    I love the inception example you used! Made a lot of sense when you used that analogy. People should start using analogies more to explain things lol.

  • @freelance-writer
    @freelance-writer 3 месяца назад +2

    "Let me explain recursion by relating it to a notoriously convoluted movie." 😂

  • @digitalgoldmine-007
    @digitalgoldmine-007 4 месяца назад +1

    tomorrow i have an exam n the question will be like they will give me last part of the recursive r any code n want me to write the recursive form of it yet i couldnt get my answer that how to know to write that.
    if u or anybody know the proceture i will be grateful if u guys tell me.

  • @kyles115
    @kyles115 Год назад +4

    Why did the programmer get stuck in a recursive loop?
    Because he wanted to see how deep the rabbit hole went, but he forgot to include a base case in his recursive function. So he just kept calling the function over and over again, each time passing in the same parameters, until his stack overflowed and his program crashed.
    But don't worry, he learned his lesson. From then on, he always made sure to include a base case in his recursive functions, and he never got stuck in an infinite loop again... at least, not until he started playing with pointers and accidentally created a memory leak.
    Ah, programming. The gift that keeps on giving, even when you wish it would just stop already.

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

      Loved this! There is always something to trip us up. My favourite one is debugging race conditions. They are impossible to replicate if you are stepping through code.

  • @weekendsonlyy3947
    @weekendsonlyy3947 10 месяцев назад +4

    love the comparison to a movie, keep up the great videos!!

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

    Sir you explained it so nicely, and that analogy was really helpful 👍👍

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

    the inception analogy was Brilliant!

  • @sebwylleman
    @sebwylleman Год назад +9

    Great explanation and visuals Alex 🔥

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

    Im learning for some time coding, but recoursion is one of those things that Im very bad at. If you dont need to nest it in the loop its not that hard. But one you need to use it in like 2-3 loops it gets hard.

  • @blazingguyop
    @blazingguyop 10 месяцев назад +2

    The best video on recursion
    What an example 🙏
    Was stuck at why it return back (kick) later understood just thinking logically 😂
    Now everything clear 😅👌
    Btw now I get it why people call some youtubers underrated😢

  • @kevint3522
    @kevint3522 9 месяцев назад +2

    Very good quality video. It's too high level for my needs though. I need to understand what's happening on the stack and with the stack frames. Do you do anything with combinatorics? Like how to use recursion to find unique combinations of k integers from a list of n integers? I ChatGBT'd it and walked through the solution. The solution wraps a recursive call into a for loop. I can almost trace it, but it is very difficult to understand. I get the impression this is a well-known problem, but I had no prayer of solving it myself because I don't know how to think through it.

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

      If you want a proper answer, the first step is to stay away from webdev channels.

    • @Nicholas.pl_
      @Nicholas.pl_ 5 месяцев назад

      same bro

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

    Can't believed I watched 10 minutes plus of videos trying to understand this only to get it on a 4 minutes 3 seconds video😂.

  • @linux_college
    @linux_college 8 месяцев назад

    thanks very much simple to understand
    can you explain to us what is BacktrackingFile please

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

    "Don't worry, I won't spoil the movie Inception for you"
    Proceeds to spoil it for me💔

    • @alexhyettdev
      @alexhyettdev  Год назад +5

      It doesn’t spoil anything beyond what you learn in the first 10 minutes of the film. I watched it again last night. Great film even though it is 13 years old already!

  • @uzairullah-4
    @uzairullah-4 2 месяца назад

    came to understand recursion, ended up understanding inception

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

    I understood inception better than recursion

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

    Nice analogy.

  • @issameldaghayes5428
    @issameldaghayes5428 14 дней назад

    I believe this movie (Predestination 2014 ) explain the true meaning of recursion, 😂 😂

  • @josephalbert.
    @josephalbert. 9 месяцев назад +2

    did you mean recursion? (this was really funny haha)

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

    thanks for the explanation 🙂

  • @OulahceneYousra
    @OulahceneYousra 8 месяцев назад

    did you mean recurions

  • @harshmalik3470
    @harshmalik3470 29 дней назад

    Recursion is a Better Way to Understand Recursion

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

    This is a Better Way to Understand Recursion

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

    char* understandRecursion(){
    int understood = 0;
    If(understood)
    return "finally";
    else
    return understandRecursion;
    }

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

      Notice that understood never becomes 1

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

    Those who didn't understand this video, I think you didn't first understand recursion. This was one of the best explanation of recursion

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

      *the best demonstration of recursion

    • @KarenLi-ht8it
      @KarenLi-ht8it Месяц назад +1

      bro if we understand recursion we wouldnt be clicking into this video in the first place, this defeats the whole purpose

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

    Recursion

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

    Nice work! Adding memoization would mitigate some of the inefficiencies you mentioned.

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

    Great video!

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

    Great video!!!

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

      Great video!!

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

      Great video!

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

    Please leave a comment bellow

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

    recursion

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

    stack overfflew

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

    Recursion

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

    Now do corecursion 😂

  • @michaelbtw
    @michaelbtw 8 месяцев назад +2

    I know you want to be fast for youtube because it's cool and edgy, but if you want people to learn from your videos, pause when you show code or equations and leave them onscreen for a few seconds so people can see what you are talking about - the human brain doesn't do well trying to read and listen at the same time.

    • @alexhyettdev
      @alexhyettdev  8 месяцев назад +2

      I have tried slowing it down a bit in newer videos. It's not really about being cool and edgy (I am too old for that), I just speak faster when nervous. I am still not that comfortable talking to a camera!

  • @UnknownGamer-lw7zp
    @UnknownGamer-lw7zp 4 месяца назад

    🔁

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

    recursion

  • @d-19jyotishchandrak70
    @d-19jyotishchandrak70 3 месяца назад

    recursion is like:

  • @DeepakKumar-ob6ps
    @DeepakKumar-ob6ps 3 месяца назад

    What was this? And why did RUclips put it on top in my search? BS

  • @objectshowfan362
    @objectshowfan362 9 месяцев назад +2

    ruclips.net/video/Q83nN97LVOU/видео.htmlsi=nmNVMsu6AHailDE_

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

    That

  • @davidtheeditor925
    @davidtheeditor925 4 дня назад

    to

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

    This is a BAD explanation..

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

    thanks for teaching. NOTHING. so i learned.....NOTHING. !! what a JOKE. !!

    • @alexhyettdev
      @alexhyettdev  Год назад +4

      Why watch a video on recursion if you already understand it?

    • @whitehh15
      @whitehh15 11 месяцев назад +5

      With a comment that dumb; it's safe to assume you're not going to understand recursion no matter how it is taught.

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

    Fuxk this recursion i leave programming because for this recursion. Now im doing mba 😅

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

      To be fair there are only a handful of times that I have put recursion to good use. You could always go back to programming once you have your MBA and start SaaS company!