Recursion in Programming - Full Course

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024

ความคิดเห็น • 620

  • @michaelcamp2870
    @michaelcamp2870 ปีที่แล้ว +25

    Around 13:20 is exactly the kind of explanation that I was looking for. I understood how recursion works when a human does it, but not how the computer would handle it. The call stack stuff cleared this up for me. Thank you!

  • @reapermerc8337
    @reapermerc8337 3 ปีที่แล้ว +241

    0:00 "When learning about recursion, it can seem like you are going back to the beginning" XDXDXD
    Why is no one talking about this neat pun

    • @vivekpuurkayastha1580
      @vivekpuurkayastha1580 3 ปีที่แล้ว +5

      Same thought here ... :smile:

    • @laurinneff4304
      @laurinneff4304 3 ปีที่แล้ว +8

      They should've also made the clip play a second time

  • @marklord7614
    @marklord7614 ปีที่แล้ว +88

    This is what the education system needs. Well-put-together courses that are accessible to anyone with a computer. I'm sure you'll continue to get likes and subscriptions well into the future because of this gem. Well done.

  • @best1000
    @best1000 ปีที่แล้ว +5

    I have watched many videos on Recursion and i can assure you this is the best way that has been explained Recursion so far. Thank you all provided and posted this video here so that million of people can universally learn this.🙏🙏🙏

  • @snehashishghosh7258
    @snehashishghosh7258 3 ปีที่แล้ว +74

    The way in which the lecture has been made is awesome... From the smallest of concepts to advanced concepts. I enjoyed learning.

  • @Ericsicons
    @Ericsicons ปีที่แล้ว +167

    Thanks for the great content! It covers so many different areas of software development.

  • @raghavsharma2762
    @raghavsharma2762 ปีที่แล้ว +5

    THERE CANNOT BE A BETTER VIDEO A RECURSION.
    YOU EXPLAINED ALL THE CONCEPTS AND PROBLEMS SO WELL.

  • @advaithsahasranamam6170
    @advaithsahasranamam6170 2 ปีที่แล้ว +3

    This. is.... BEAUTIFUL. ABSOLUTELY BEAUTIFUL LIKE DAMN. Why isn't anyone teaching like this guy?
    Hats off to you!

  • @polimorphic13
    @polimorphic13 ปีที่แล้ว +18

    The analogies and snippets of code are truly amazing. Thank you for this course!

  • @chewbacca9783
    @chewbacca9783 2 ปีที่แล้ว +3

    The best Recursion Video available on internet.
    Thanks for making the video.

  • @xzoldik
    @xzoldik 9 หลายเดือนก่อน +1

    This the best tutorial of recursion I have ever seen on youtube
    such a great simple explanation really from zero to hero

  • @billiamreynolds
    @billiamreynolds 3 ปีที่แล้ว +32

    Man thank you so much for your explanations of how recursive calls work on the call stack, and then also how to interpret the call stack through debugging. This cleared up so much confusion for me!

  • @raunakmitra7868
    @raunakmitra7868 3 ปีที่แล้ว +49

    The ATM analogy was very elegant.❤️

  • @animemotivationx
    @animemotivationx 2 ปีที่แล้ว +11

    In the beginning when I started learning programming I didn't think recursion is that much important but when I started to learn DSA. I figured it out recursion is the soul of DSA and now I am learning, I have crossed 1:30 hr video and it has been so much fun and easy to grab. The tutor is really good ...

    • @Codenames560
      @Codenames560 2 ปีที่แล้ว +3

      Agreed man, the worst thing I've done was trying to attempt tree, graph and linkedlist problems without a complete understanding of recursion.

    • @ru2979
      @ru2979 2 ปีที่แล้ว

      1:30:00

  • @mylaramvenkatesh9796
    @mylaramvenkatesh9796 2 ปีที่แล้ว +12

    There are no words to praise you about your explanation and content, Really Mind blowing for me, Super content thank you man

  • @pravatyadav3623
    @pravatyadav3623 3 ปีที่แล้ว +52

    Google algo needs to put this video on top when searching for recursion

  • @jasonistheking
    @jasonistheking 3 ปีที่แล้ว +37

    I feel like the first 5 minutes of this video helped me understand recursion better than my CS classes in college. I ended up switching tracks away from CS because I couldn't wrap my head around recursion and trees...

    • @looming_
      @looming_ 2 ปีที่แล้ว +2

      You cannot understand trees or graphs without recursion. It takes some practice, but becomes quite intuitive once you wrap your head around it.

    • @GrantH2606
      @GrantH2606 2 หลายเดือนก่อน

      @@looming_ Some of us never wrap our heads around it

    • @looming_
      @looming_ 2 หลายเดือนก่อน

      @@GrantH2606 me from 2 years later… it’s a doozy haha

  • @ahmedbello6298
    @ahmedbello6298 3 ปีที่แล้ว +10

    Thank you so much for the video. This is the best explanation I've got on recursion after several books and TH-cam videos. The analogy where people were waiting in a queue (for ATM) is in my view what set my mind free on how to go about recursion. Now I know how and why a problem is attacked recursively.
    Cheers from me!

  • @MrVernuk
    @MrVernuk 3 หลายเดือนก่อน

    Awesome course with explanation about how actually works well known data structures using recursion! Hats off, man :)

  • @haruka3203
    @haruka3203 2 ปีที่แล้ว +14

    I am mind blown. I almost never use recursion because it felt so alien to me, I've done everything in for loops, while loops, etc, but mostly for loops.
    I've never seen so little lines of code typed for something very very complex! This makes me rethink how I program. Rather than seeing what's in front of me, but taking a step back, identifying a pattern, using that pattern flow to your advantage, adjust the course of the river and viola you've done it.

    • @sret919
      @sret919 9 หลายเดือนก่อน

      I guess functional programming works like that. Bartozs Milewski was talking about what you are describing here, it reminded me that.

  • @nidhalmejai346
    @nidhalmejai346 6 หลายเดือนก่อน

    the examples with which you explain and visualize the call stack was the most important part in this tutorial i think the call stack was the part we all missed when learning about recursion and you just explained it carefully and clearly thank you for the efforts you have put in this video.

    • @TheSimpleEngineer
      @TheSimpleEngineer 5 หลายเดือนก่อน

      Glad you enjoyed!

    • @synapse9869
      @synapse9869 หลายเดือนก่อน

      ​@@TheSimpleEngineerhey man great video can you tell me which debugger plugin you used to display breakpoints ?

  • @idc20627
    @idc20627 2 ปีที่แล้ว +6

    Im surprised factorial wasn't amongst one of the examples. This resource plus the MIT lecture on youtube regarding recursion has cemented this tool for. On to the next tool!

    • @Shil131
      @Shil131 ปีที่แล้ว +1

      will you be able to share the mit lecture video link?

  • @jmbrjmbr2397
    @jmbrjmbr2397 9 หลายเดือนก่อน

    I have already commented but I want to comment again.. How good is this lecture? It's unbelievable. Thank you so much great people, I love you so much

  • @servantofthelord8147
    @servantofthelord8147 9 หลายเดือนก่อน

    This video explained the call stack excellently! Recursion is one of those things I just assumed "oh, it's difficult so nobody really get's it other than theoretical researchers, so I don't need to really close that knowledge gap, but in fact this video showed me it didn't need to be so difficult. Great job!

  • @shukrulloabduqodirov4353
    @shukrulloabduqodirov4353 10 หลายเดือนก่อน

    Aynan Uzbda yetishmayotgan proekt bolibdi. Omadilarni bersin! Alloh adashtirmasin. Ohirigacha hayrli haloli bo'lsin!!!

  • @jmbrjmbr2397
    @jmbrjmbr2397 9 หลายเดือนก่อน

    This is an extremely high quality, precious video. I haven't studied cs in uni, but I highly doubt the education is this high quality there.

  • @sanujamethmal9188
    @sanujamethmal9188 3 ปีที่แล้ว +19

    Thanks a lot. These kind of videos are so rare. Please consider more videos on functional programming design patterns

  • @servantofthelord8147
    @servantofthelord8147 9 หลายเดือนก่อน

    WOAH! The ATM ANALOGY WAS EVERYTHING FOR ME! I wish I saw this when I first started learning about recursion, hahaha, thank you very much!

  • @musicmelody1085
    @musicmelody1085 2 ปีที่แล้ว +1

    0:39:27 if(left>right-1) is the correct answer because if we write code(left>right) and give input 20 is not in array the loop can run again and again show the Error!!👌

  • @akmzahidulislam2764
    @akmzahidulislam2764 2 ปีที่แล้ว

    Just wonderful! A brilliant teacher who is wholeheartedly passionate and industrious about teaching. Result? You watch this.

  • @atharvpal7038
    @atharvpal7038 8 หลายเดือนก่อน

    One of the best lectures I have ever seen. Thank you very much!

  • @ankitshrivastava3672
    @ankitshrivastava3672 3 ปีที่แล้ว +12

    what a timing, I am just finishing the last section of freecodecamp js DSand Algo certification and I feel like there should be a separate section on recursion, here it is...thanks a lot

  • @chhavimanichoubey9437
    @chhavimanichoubey9437 3 ปีที่แล้ว +1

    yes this fucking video was needed by many people like me who still doesn't understand recursion and have no idea how to contemplate this.

  • @satestactmathtutor6570
    @satestactmathtutor6570 ปีที่แล้ว

    i enjoyed how you show the stacks and did alot of examples.. big big thanks from Egypt

  • @saikumarrr5
    @saikumarrr5 หลายเดือนก่อน

    Thank you for the content. It's really helpful to change the perspective while trying to solve a problem.

  • @ADITYA-fk1zy
    @ADITYA-fk1zy 2 ปีที่แล้ว

    using relative analogies and debugger to explain call stuck made it easy for me understand,Thanks simple Engineer

  • @prasunkumar1434
    @prasunkumar1434 3 ปีที่แล้ว +5

    Every time I am in search for a topic, FCC comes with a video. Thank You FCC for your efforts.

  • @bac9982
    @bac9982 3 ปีที่แล้ว +8

    Like many other comments, the simplistic breakdowns of recursion in this video help make sense of this topic for even the most confused. I thoroughly enjoyed this video and wish this could get bumped up for more of the world to see!

  • @shankarghimire4492
    @shankarghimire4492 2 ปีที่แล้ว +12

    Thank you so much Ryan for sharing your knowledge with the world!
    Very amazing content and explanation! :)

  • @tirupatirao7521
    @tirupatirao7521 2 ปีที่แล้ว

    This is simple and crystal clear to start with. Dn,t underestimate as it is long video.it’s 200% wort

  • @yoursamrit2000
    @yoursamrit2000 3 ปีที่แล้ว +20

    First, I've always wanted to know about this. And here you are!!

    • @tibettenballs4962
      @tibettenballs4962 2 ปีที่แล้ว

      You ever suqq on it and later repent for your sins?

  • @Spaaace
    @Spaaace 2 ปีที่แล้ว +3

    You know, when I first started out with the self-taught path, I was told "GO TO FREE CODE CAMP, they are GREAT". And I didn't listen. I've seen many many MANY tutorials after 2.5 years of this (awesome) journey, and I gotta say.... reeaalllllllyy wish I had listened. You guys ROCK! It is incredibly rare to find a tutorial that can even try to keep up with the quality of learning your channel/org offers. It is smooth and concise and most importantly, accurate. Thanks for the content, and I will always lead those who are curious to your doorstep first.

    • @user-zr6jm4ld9l
      @user-zr6jm4ld9l 2 ปีที่แล้ว

      In a paid bootcamp right now and I completely agree.

    • @miresoman1769
      @miresoman1769 2 ปีที่แล้ว

      @@user-zr6jm4ld9l What does it mean to be incompletely agree?

    • @user-zr6jm4ld9l
      @user-zr6jm4ld9l 2 ปีที่แล้ว

      @@miresoman1769 thanks. It was an autocorrect I didn't catch. I fixed it.

  • @vnaveenkumar982
    @vnaveenkumar982 3 ปีที่แล้ว +1

    the first statement itself changed my entire perception, towards recursion.

    • @ricric4722
      @ricric4722 2 ปีที่แล้ว

      Right 😂😂 It was a nice pun

  • @RahulSharma-lw2ss
    @RahulSharma-lw2ss ปีที่แล้ว

    Best ever video for entire recursion concept

  • @F.R.A.N.K.I.E
    @F.R.A.N.K.I.E 3 ปีที่แล้ว +2

    This is such a comprehensive course. I understood recursion better than i ever thought I would. THANK YOU!

  • @caiocutrim3596
    @caiocutrim3596 ปีที่แล้ว +1

    what's up guys?
    This content is amazing, I'm really impressed with the simplified approach.
    I'm learning a lot.

  • @davidwalker6960
    @davidwalker6960 2 ปีที่แล้ว +5

    Excellent. Recursion has always been a mental twister for me. Trying to master it now, to make it a normal part of my thought processes when developing. Very informative, easy to follow. Thanks!

  • @Archius_09
    @Archius_09 3 ปีที่แล้ว +409

    I sometimes feel guilty as i dont pay any fees to them and yet dont have time to study all this things :(

    • @girlgotTECH
      @girlgotTECH 3 ปีที่แล้ว +23

      You are the voice of my soul

    • @utkarshkukreti239
      @utkarshkukreti239 3 ปีที่แล้ว +26

      You have to study in order to get the skill and then earn from your skill then you can pay and don't feel guilty.

    • @Archius_09
      @Archius_09 3 ปีที่แล้ว +4

      @@utkarshkukreti239 i am a student and my education comes first of all

    • @djay00009
      @djay00009 3 ปีที่แล้ว +2

      Don't lie. I know newton's a genius

    • @ferhatbeztout1447
      @ferhatbeztout1447 3 ปีที่แล้ว +1

      Isaac Newton what're you doing in the 21th century ?

  • @JeanFrancoisDesrosiers
    @JeanFrancoisDesrosiers 2 ปีที่แล้ว +27

    Been coding since 1997: recursion is good for academic purposes but almost everytime I saw it in a product, it was a source of bugs due to usage of stack above limits, which limits are very difficult to guess. Each f call is on stack.

    • @TheSimpleEngineer
      @TheSimpleEngineer 2 ปีที่แล้ว +4

      There are definitely trade-offs. In some of my professional work, we've dealt with data structures that are tree and graph-based (ie. graph databases and the algorithms that need to be built around the data) where traversals are inherently more elegant and easily understood via recursion, whereas the iterative counterpart is a mess and often impossible to conceptualize with loops. The risk is memory, but when the bounds are understood, you can make an informed decision more appropriately. This is also true with a lot of taxonomy work when you're dealing with schemas, for example (trees).

    • @samCoder
      @samCoder 2 ปีที่แล้ว

      I would suggest not to simply nullify the topic. Yes, you won't use it much but it's great for concept building. FYI, I recently used Recursion in my project. I was bulding a component to show hierarchy using Tree-grid.

    • @juliolopes2062
      @juliolopes2062 2 ปีที่แล้ว +1

      I tried using the decimal to Binary example at 31:14 in a for loop and in the recursion way he showed, and tried to use the function for big numbers like pow (99, 99), it worked but recursion executed 3 times slower than the for loop, and increasing the number, to pow(99,150) I get a stack error.
      So, I won't use this at my work at all. Only in case I might need to use with something related to graph.

    • @TheSimpleEngineer
      @TheSimpleEngineer 2 ปีที่แล้ว

      @@juliolopes2062 Definitely good to evaluate why and when it's a good choice to use it. 3x slower on modern day systems for small amounts of data is negligible. Think 5 nanoseconds vs 15 nanoseconds. However, on large datasets, recursion will of course be slower. Cheers! Nice work on investigating the performance.

  • @galibmahim9544
    @galibmahim9544 ปีที่แล้ว +1

    Very nicely explained. Well for me The ATM example quite describes in on itself what recursion is then the stack memory that computer has explains why it works like last task to the first.
    Again very good. Appreciate❤

  • @sret919
    @sret919 9 หลายเดือนก่อน

    This is an icredibly high quality and valuable, precious video. I love internet, I love youtube, I love these nice people teaching with this much quality

  • @SaschaRobitzki
    @SaschaRobitzki ปีที่แล้ว +1

    Great course! Following along in C++ and it works very well.

  • @dimam.4960
    @dimam.4960 2 ปีที่แล้ว +1

    okay, you all telling that you understood recursion and all of this.
    but let's appreceate the man for finally explain us why Stack Overflow is Stack Overflow :D

  • @mrbadmanzaman
    @mrbadmanzaman 2 ปีที่แล้ว +2

    Great video, helps explain recursion clearly using good examples and diagrams. I use it to help teach recursion in my A level CS classes. I recommend trying to implement the examples in code (I used Python) to help better understand the examples. The instructor also uses a good clear tone of voice with the right amount of pace so it is easy to follow the explanations.

  • @jasmine9538
    @jasmine9538 2 ปีที่แล้ว

    It took me about 5 replays to for the linked list reversal to click. But when I had my "ah ha" moment... chef's kiss! 😚Amazing!

  • @edwinroman30
    @edwinroman30 7 หลายเดือนก่อน

    I'll put a comment to remember through out your likes, that I watched this incredible master piece about recursion 🎉. Great job, thanks for this amazing lecture!

  • @sojanmathew5875
    @sojanmathew5875 12 วันที่ผ่านมา

    Decimal To Binary Code (at 30:00 ) can be simplified (without passing result parameter)
    String findBinary(int decimal) {
    if (decimal == 0 ) return "";
    return findBinary(decimal /2 )+ (decimal % 2);
    }

  • @abdourahman87
    @abdourahman87 2 ปีที่แล้ว

    Thanks to the simple engineer now that I really understand what recursion is all about. You really made my day today :)

  • @millsdickson8498
    @millsdickson8498 ปีที่แล้ว

    Wow, recursion...done! Thank you so much for this very excellent presentation! I now have a solid foundation on this matter.

  • @slurpeesauce1750
    @slurpeesauce1750 2 ปีที่แล้ว +1

    Makes programming way more fun thank you

  • @firdousaslam2173
    @firdousaslam2173 3 ปีที่แล้ว +1

    this chanel is responsible for soo many people's career OMG

  • @iiimiiim
    @iiimiiim ปีที่แล้ว

    I love the ATM example. Thanks!

  • @mrboyban
    @mrboyban 2 ปีที่แล้ว +1

    Well done mate! Better than a so called "UK Top University"

  • @SumanPokhrel0
    @SumanPokhrel0 3 ปีที่แล้ว +5

    I am just starting DSA , and u just dropped a gem , thank you so much 🤟🤟

  • @drewperotti
    @drewperotti 2 ปีที่แล้ว

    Thanks for the vid, I've had a hard time with recursion and this is really helping.

  • @madhubalajayakumaran9340
    @madhubalajayakumaran9340 2 ปีที่แล้ว

    Thanks Ryan and FreeCodeCamp for this!!

  • @christopherchu2516
    @christopherchu2516 ปีที่แล้ว +1

    wow 3 minutes in and i absolutely love the analogy you used. it explains recursion so well and so easily

  • @gregorywilson2124
    @gregorywilson2124 2 ปีที่แล้ว

    Marty Stepp used the same counting analogy to teach recursion: great approach

  • @ethiopiangirl447
    @ethiopiangirl447 ปีที่แล้ว

    def binary(n):
    a=[]
    a.append(n%2)
    if n

    • @ethiopiangirl447
      @ethiopiangirl447 ปีที่แล้ว

      this code interestingly only returns 0, for all the times its supposed to append n%2 to a, it does it but eventually it returns zero. I have the working code but I dont know why this is peace of code is behaving like this... It's python, Decimal to binary question.

  • @Moses_coder
    @Moses_coder ปีที่แล้ว

    Good work, simplifies what seems to be complex stuff

  • @gigachad400
    @gigachad400 3 ปีที่แล้ว +1

    Best video on recursion!!

  • @aarondiaz2506
    @aarondiaz2506 ปีที่แล้ว

    No words, thank you, can't ask for a better teacher🙌

  • @theamatuer9097
    @theamatuer9097 3 ปีที่แล้ว +2

    What a video! This is much easier to understand than the CS course I'm taking. Thank you, The Simple Engineer.

  • @mohamedgad4291
    @mohamedgad4291 2 ปีที่แล้ว

    on *39:39* , when you calculate the mid you should add the ( left ) value to the calculations

  • @Abhi-qi6wm
    @Abhi-qi6wm 3 ปีที่แล้ว

    def print_tree(self):
    if self.root:
    self._print_tree(self.root)
    else:
    return 'Empty Tree'

    def _print_tree(self, curr_node):
    if curr_node:
    self._print_tree(curr_node.left)
    print (str(curr_node.data))
    self._print_tree(curr_node.right)
    My implementation of the print function for a binary tree

  • @muntasirmahmudsaif6239
    @muntasirmahmudsaif6239 ปีที่แล้ว

    on 26:48
    pseudocode for other language
    function isPalindrome(str) {
    if (str.length < 2) {
    return true;
    }
    if (firstCharacter(str) === lastCharacter(str)) {
    return isPalindrome(middleCharacters(str));
    }
    return false;
    }

  • @vikramc08
    @vikramc08 ปีที่แล้ว

    Thanks a lot for your effort! It is really helpful video. And I can see how with great patience, you explain recursion on different topics. Thanks again!!

  • @e28makaveli
    @e28makaveli ปีที่แล้ว

    Good stuff! Very clear and concise. Thank you.

  • @eclecticspirit4803
    @eclecticspirit4803 4 หลายเดือนก่อน

    best video to understand recursion

  • @LOKESHPANDEYjob2014
    @LOKESHPANDEYjob2014 3 ปีที่แล้ว +2

    The iterative solutions was going through my mind for all the problems here except the graphs problems. Understood the concept of recursion, well explained.

  • @7Saints78
    @7Saints78 ปีที่แล้ว

    A very well-thought-out video. The animations are really helpful.
    However, one major flaw for me was that the instructor does not show you how to create the code. He takes the pre-defined code snippets and explains them through animations. This explanation is genuinely helpful, but while actually implementing the code by ourselves we need to understand the correct way to approach the problem. The theory in the beginning can only do so much. All pre-defined coding sections impose the idea of the solution without inducing the challenge of coding from scratch. This in a way forces an indirect rote learning principle. Pupils will always try to recreate the code snippet they understood, but will not try to create a solution by themselves.

  • @kushpatelstudent6862
    @kushpatelstudent6862 ปีที่แล้ว +1

    Quick Question: So recursion works by building a stack until a terminating condition is met, and once that terminating condition is met then the stack will execute. This is my idea of recursion, is it correct?

  • @alkhiljohn7640
    @alkhiljohn7640 2 ปีที่แล้ว

    These guys deserve an award :)

  • @perezshealtiel7011
    @perezshealtiel7011 2 ปีที่แล้ว

    Very nice illustrations. Thank you.

  • @mamdouhaiesh4584
    @mamdouhaiesh4584 2 ปีที่แล้ว

    in order to be important in this world you have to understand the most difficult concepts not the easiest ones and you think you are awesome at this point

  • @supersaiyan-goku-san
    @supersaiyan-goku-san 3 ปีที่แล้ว +2

    The explanation is elegant and awesome! Top notch work

  • @evachild
    @evachild 2 ปีที่แล้ว

    Great refresher for interview practice!

  • @RyanScarbrough
    @RyanScarbrough ปีที่แล้ว

    Epic intro, can already tell it's a goodone!

  • @farrukhahmedsid
    @farrukhahmedsid 5 หลายเดือนก่อน

    A must have video. Cheers to the freecodecamp. God bless you.

  • @pew4410
    @pew4410 2 ปีที่แล้ว +1

    16:58 start

  • @MianyunNi
    @MianyunNi 8 หลายเดือนก่อน

    Thank you so much for doing this! Best video ever!~

  • @sherazdotnet
    @sherazdotnet 2 ปีที่แล้ว

    Print All Leaf Nodes solution doesn't need if conditions on line 8 and 10. Base condition is guarding against nulls so no need to check it again.

  • @indraxios
    @indraxios ปีที่แล้ว +2

    I got the feel of recursion in first 3 minutes

  • @psppoks
    @psppoks 3 ปีที่แล้ว

    Thank's Now I Understand Recursion Thanks @The Simple Engineer

  • @junaiddevilliers4296
    @junaiddevilliers4296 2 ปีที่แล้ว +6

    Great lecture😊 just wanted to point out that at the palindrome exercise on line number 9 when you call the method again shouldn't the parameter be (input.substring(1, input. Length() -2); because input.length-1 won't change the substring

    • @junaiddevilliers4296
      @junaiddevilliers4296 2 ปีที่แล้ว +2

      Keep in mind I'm working with c# not java, just wanted to point it out incase it helps someone

    • @yosefsilberg2658
      @yosefsilberg2658 2 ปีที่แล้ว

      Totally agree

    • @Soulgirl09
      @Soulgirl09 2 ปีที่แล้ว

      Only the beginning of the substring is inclusive. Length() - 2 would not be included. It should be length() -1 to get the second to last character.

    • @tedigrizli
      @tedigrizli 2 ปีที่แล้ว +1

      It's about how the substring method works for the current programming language. In JS for example, the second parameter is exclusive to the index-based count.

  • @djay00009
    @djay00009 3 ปีที่แล้ว +3

    A whole course of recursion. Awesome

  • @inspirationalquotes5840
    @inspirationalquotes5840 3 ปีที่แล้ว +3

    there is a mistake in Palindrome the method should be
    return isPalindrome(input.Substring(1, input.Length -2));

    • @brianpwnsjustin
      @brianpwnsjustin 3 ปีที่แล้ว

      It's not wrong. subString in javascript doesn't include the actual index for the second parameter.

    • @nonconsensualopinion
      @nonconsensualopinion 3 ปีที่แล้ว +1

      @@brianpwnsjustin He's using Java. Your observation still holds.

  • @havefun5519
    @havefun5519 ปีที่แล้ว

    Thanks for the great detail tut.

  • @pygeekrfoo820
    @pygeekrfoo820 ปีที่แล้ว

    the Fibonacci explanation was masterful

  • @Ferndalien
    @Ferndalien 2 ปีที่แล้ว

    Recursive:
    re-kers-ive prefix re - repeated,
    suffix - ive having the nature of
    curse - to invoke the wrath of a deity or to express feelings with an expletive
    example: "all my code is recursive when I'm debugging it."