Java Recursion

  Рет қаралды 393,369

Derek Banas

Derek Banas

Күн бұрын

Пікірлер: 339
@derekbanas
@derekbanas 5 жыл бұрын
Learn in One Videos for Every Programming Language Subscribe to Bookmark them: bit.ly/2FWQZTx C++ : kzbin.info/www/bejne/iKbFXn2pn7Kbjbs Python : kzbin.info/www/bejne/hGXQdq18ec-kqqM Java : kzbin.info/www/bejne/pF7bcqSZd6iqqZY PHP : kzbin.info/www/bejne/bYWpYWOef65qbrs MySQL : kzbin.info/www/bejne/r4HYZ6SMasesq5Y JavaScript : kzbin.info/www/bejne/nJvYapyfbb6mfdU C# : kzbin.info/www/bejne/oprWmqqLj6-Lp7M HTML5 : kzbin.info/www/bejne/oXXce4FtprZ4iqM CSS3 : kzbin.info/www/bejne/eYbbeZKojLh8Z80 JQuery : kzbin.info/www/bejne/eIi7mJp4YrlkoLM TypeScript : kzbin.info/www/bejne/Y4G1kIunjJ59gLc ECMAScript : kzbin.info/www/bejne/gJLOoJxmfJ2feMk Swift : kzbin.info/www/bejne/mnzEoJ2Fj5KUsJo R : kzbin.info/www/bejne/qWSpoK2Mm8lqp5Y Haskell : kzbin.info/www/bejne/ZmPCeWaCn9aAqJo Handlebars : kzbin.info/www/bejne/annYcqGDa8dlmpo Bootstrap : kzbin.info/www/bejne/naKydqKLh5qFfsk Rust : kzbin.info/www/bejne/i2Kod5p5g7F3eJo Matlab : kzbin.info/www/bejne/hIS2hZ6hgLeUmKs Arduino : kzbin.info/www/bejne/h4DCe5-wZtajetk Crystal : kzbin.info/www/bejne/eqmpgWCNn9anqcU Emacs : kzbin.info/www/bejne/f5LKk6lvbJl6orM Clojure : kzbin.info/www/bejne/mZqqqnuhedqDd6c Shell : kzbin.info/www/bejne/nqjVn6CHqtKnhtk Perl : kzbin.info/www/bejne/jXbKmXyOqJ15bMU Perl6 : kzbin.info/www/bejne/omHdgaqenLyHna8 Elixir : kzbin.info/www/bejne/pnOxgJSsh9SBgpI D : kzbin.info/www/bejne/qKi9d4ekm56Verc Fortran : kzbin.info/www/bejne/lZCVhpp8g76anJo LaTeX : kzbin.info/www/bejne/jJnQnH-ohM9_qdk F# : kzbin.info/www/bejne/mWjIf3eAg5xobrc Kotlin : kzbin.info/www/bejne/fpDSeJxuqtp3pqM Erlang : kzbin.info/www/bejne/f3bLqJZoppatfZY Groovy : kzbin.info/www/bejne/eGqbm5Zuncmob8k Scala : kzbin.info/www/bejne/equppWOPoL-ibq8 Lua : kzbin.info/www/bejne/n37ElKuQhrKDjtU Ruby : kzbin.info/www/bejne/epvManSCeMyZpq8 Go : kzbin.info/www/bejne/eXechGeHj9qJaZI Objective C : kzbin.info/www/bejne/a5bWgqSQfq9rack Prolog : kzbin.info/www/bejne/iarOqYqme9yAfdU LISP : kzbin.info/www/bejne/r562ometfdekr7c Express : kzbin.info/www/bejne/rnWmfJaEd6umq6s Jade : kzbin.info/www/bejne/omakiZaOdrVnqJo Sass : kzbin.info/www/bejne/rauWnHiigcd4fqc
@tushargupta0596
@tushargupta0596 5 жыл бұрын
Can u pls speak slowly
@tushargupta0596
@tushargupta0596 5 жыл бұрын
It's very very difficult to understand you because you speak so so fast
@elicompton5122
@elicompton5122 6 жыл бұрын
In order to understand recursion, you must first understand recursion
@derekbanas
@derekbanas 6 жыл бұрын
That's funny :)
@anugrahgeorge8293
@anugrahgeorge8293 4 жыл бұрын
No. In order to to understand recursion, you must first understand recursion. In order to understand recursion, you must first understand recursion .In order to understand recursion, you must first understand recursion . In order to understand recursion, you must first understand recursion . . . . . . . Constant loop
@ExarchiasGhost
@ExarchiasGhost 4 жыл бұрын
@@anugrahgeorge8293 do you mean recursion?
@anugrahgeorge8293
@anugrahgeorge8293 4 жыл бұрын
@@ExarchiasGhost yes but in order to understand what u asked...U need to ask urself what is recursion. Then understand recursion. Then understand recursion. Then understand recursion. *bloody loop*
@ExarchiasGhost
@ExarchiasGhost 4 жыл бұрын
@@anugrahgeorge8293 ok but I will start from the recursion because when I tried with recursion I got results from a recursion. :)
@daniels6824
@daniels6824 10 жыл бұрын
I spent 3 semesters in computer science courses avoiding recursion like the plague. I have had only excellent teachers, but never nailed down the nuances that kept recursion confusing. Here I am, at 4 am the night before my final and you absolutely nailed it (it was the going back up concept, among other things). Progressing in this field can be difficult, and I am very thankful for your tutorials. You must love what you do!
@derekbanas
@derekbanas 10 жыл бұрын
I absolutely love programming :) I'm very happy that I was able to clear up a very often confusing topic. That is always the goal of each video.
@yankomirov4290
@yankomirov4290 5 жыл бұрын
Where are you working now, after 4 years?
@atift5465
@atift5465 5 жыл бұрын
This was an amazing explanation! Im right there with you!
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) Im very happy I was able to help. I worked as a programming architect for many years and one of my responsibilities was to train new hires. I always enjoyed doing that. While making these videos I imagine someone is standing behind me and learning. It makes me very happy to be able to help
@derekbanas
@derekbanas 11 жыл бұрын
I'm extremely grateful to be able to help in what ever way I can. Thankfully there are thousands of people that love to teach and that number will continue to grow. Eventually a complete education on every topic will be available for free to all across the globe.
@howchen8529
@howchen8529 5 жыл бұрын
I spent so long on the first recursive function thinking he passed in 1.6
@whyisthereyou
@whyisthereyou 4 жыл бұрын
Omggg, I was trying to figure out too and how he went from 1.6 to 2.5 lol
@theelvensong4328
@theelvensong4328 4 жыл бұрын
Me too :)
@keyseafloralde8795
@keyseafloralde8795 4 жыл бұрын
Sameee hahah
@trendytopics-
@trendytopics- 2 жыл бұрын
SAME
@derekbanas
@derekbanas 11 жыл бұрын
I have been programming for over 25 years. In the beginning I studied constantly, but now I pretty much have my system and I follow it. I write code for about 1/2 the day 7 days a week. I keep up on the new technologies, but I mainly still use Java, C, C++, PHP and JavaScript for everything. I am very lucky in that I can decide what projects I want to work on, so I'm always excited to program. I mainly write programs with a ton of math, or simulations
@yaanyfizzle
@yaanyfizzle 9 жыл бұрын
I just watched 3 tutorials, got absolutely nowhere, and within the 1st 50 seconds of this video you explained it! Derek Banas > All
@derekbanas
@derekbanas 9 жыл бұрын
***** Thank you :) I'm happy I could help.
@yaanyfizzle
@yaanyfizzle 9 жыл бұрын
Not as happy as I am mate. Thankyou 😌
@sandblaster007
@sandblaster007 5 жыл бұрын
I know this video is from 2013 but I couldn't wrap my head around recursion at all until I watched this. I'm a freshman in college with a great teacher but she wasn't able to explain it this well. Thanks so much! :D
@derekbanas
@derekbanas 5 жыл бұрын
I'm very happy I could help :)
@justinli19901027
@justinli19901027 8 жыл бұрын
Need to concentrate extremely hard but very well explained.
@derekbanas
@derekbanas 8 жыл бұрын
+Justin Li Thank you :)
@hananeaf4508
@hananeaf4508 7 жыл бұрын
Is it because of the accent? hehehe
@SoeaOu
@SoeaOu 11 жыл бұрын
Thank You. I was so afraid of recursion and the fact that i couldn't come up myself how to do factorials using recursion, but when I saw the third example I made it myself, so easy :D I think this are the best intermidiate/advanced java tutorials on the internet.
@derekbanas
@derekbanas 11 жыл бұрын
I'm glad it helped :) I figured if I provided enough walkthroughs that it would make sense
@sebastianfarias5670
@sebastianfarias5670 8 жыл бұрын
wow, every time I struggle with x/y concept there is a video in your channel that helps me understand it 100%... Again, thank you Derek!!!!!
@derekbanas
@derekbanas 8 жыл бұрын
Thank you for the compliment :) I'm happy I can help
@derekbanas
@derekbanas 11 жыл бұрын
I'm happy that I could clear it up. I don't know why so many people struggle with teaching this topic?
@123japanuser
@123japanuser 11 жыл бұрын
Caro Coach, La tendenza sarà in vita fino a quando si ottiene il tutorial grandi. Tu sei la ragione per la nostra capacità di migliori. Più potenza per voi. grazie
@derekbanas
@derekbanas 11 жыл бұрын
Well I'm very happy to help! I'm glad he likes his job at least :)
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) I try to make the best videos I can. I'm glad you liked it
@iNewbieNick
@iNewbieNick 9 жыл бұрын
This is my first year in college and I'm majoring in computer science. Our professor just tried to teach us about recursion but didn't do it very well and left the class thinking "WHAT JUST HAPPENED. WHY DID THAT WORK!?!?!", myself included. I've had an issue where I haven't been able to comment on videos for a year and was too lazy to fix it. This video was so helpful, and I'm so grateful, that I got off my lazy ass and figured out how to fix my problem just so I could comment on this video and thank you. Thank you for teaching me about this confusing concept!! You're the best!
@derekbanas
@derekbanas 9 жыл бұрын
iNewbieNick Thank you very much for all the nice compliments :) I appreciate you taking the time to tell me that I helped. You're very welcome.
@derekbanas
@derekbanas 11 жыл бұрын
Great! I'm glad I was able to make recursion make sense :)
@gadafiali9151
@gadafiali9151 11 жыл бұрын
You just earned a comment, a subscription, and a fan.
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :)
@derekbanas
@derekbanas 11 жыл бұрын
Pick projects that are fun. I only work on fun projects. When I was young and just starting with programming I made games and nothing else because games are fun to make. Games also require you to know many things. Don't try to memorize because that will just bore you. Instead come up with an idea, copy and paste others code and then just fix the errors. Once you get past the basics programming is very fun
@derekbanas
@derekbanas 11 жыл бұрын
Thank you very much :) It is hard to work through the first time, but after you get it it makes sense. I'm very happy that I've been able to help
@nicolaslondono7188
@nicolaslondono7188 8 жыл бұрын
You are the god father of programming tutorials!
@derekbanas
@derekbanas 8 жыл бұрын
+Nicolas Mazorra Thank you for the nice compliment :)
@derekbanas
@derekbanas 11 жыл бұрын
I think I have a pretty intelligent community. Many of them stayed with me through design patterns and refactoring. If they can handle those topics recursion should be a breeze. You are right though that things can go crazy if they try to use the merge sort on a 10,000 item array :)
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) I have a mile long list of algorithms in the works
@YouB3anz
@YouB3anz 10 жыл бұрын
I think it's worth mentioning that this implementation of merge sort, with in-place index shifting on an array, is O(n^2). Merge sort is usually taught using substructures and is O(nlg(n)).
@loganphillips1674
@loganphillips1674 8 жыл бұрын
Wow thank you so much. My data structures text book didn't explain at all how this works. I ran an example in the debugger and was extremely confused why it went "back up" once it hit the base case. You cleared it up in the first 2 minutes. Thank you!
@derekbanas
@derekbanas 8 жыл бұрын
Thank you :) I'm glad I could help
@123japanuser
@123japanuser 11 жыл бұрын
Уважаемый тренер, Это мульти лингвизм становится серьезным :) Спасибо, еще раз, за все, что вы делаете.
@derekbanas
@derekbanas 11 жыл бұрын
I program with Eclipse Indigo. I record the screen with Camtasia 2. I edit everything with iMovie. My microphone is a simple iPod headphone mic.
@derekbanas
@derekbanas 11 жыл бұрын
I make custom applications for a small group of people. Mainly tools they use for investing. I also make apps for professors (research stuff). On top of that I run 8 online stores. Yes, it is great to be in a position to turn down business. For 4 years I had to take on every project and it sucked. I'll never put myself in that position again
@123japanuser
@123japanuser 11 жыл бұрын
Уважаемый тренер, Это мульти лингвизм становится серьезным :))) Спасибо, еще раз, за все, что вы делаете.
@derekbanas
@derekbanas 11 жыл бұрын
Absolutely you should go! I could have continued, but I was working to pay my way. I got a few scholarships and I refused to take out loans. That is the main reason it was hard for me. I also didn't like the speed and I didn't feel like I was learning everything. College just isn't for everyone, but if I could have afforded to go to a good school for free, or inexpensively I definitely would have gone
@WhoForgot2Flush
@WhoForgot2Flush 6 жыл бұрын
I actually came here because I was trying to make a merge sort algorithm and wanted a better understanding of recursion before starting. Thanks for covering merge sort too very helpful.
@derekbanas
@derekbanas 6 жыл бұрын
Thank you :) I'm glad it heped
@lightbikevids1422
@lightbikevids1422 11 жыл бұрын
after watching the first example i understood it so well, my teacher spent a whole class on recursion understood nothing thanks
@redvel5042
@redvel5042 7 жыл бұрын
Actually, for triangular numbers, you can calculate it like this: public int getTriNum(int num) { return (num + (num * (num - 1) / 2)); } Or a bit more understandably: public int getTriNum(int num) { for(int i = 1; i
@derekbanas
@derekbanas 7 жыл бұрын
Thank you for sharing :) I was just looking for an excuse to use recursion
@veebuv
@veebuv 9 жыл бұрын
fantastic, got it in one go. Perfectly paced.
@derekbanas
@derekbanas 9 жыл бұрын
Vaibhav Namburi Thank you :)
@derekbanas
@derekbanas 11 жыл бұрын
Grazie per le gentili parole. Io continuerò a fare del mio meglio
@derekbanas
@derekbanas 11 жыл бұрын
Because if you have num + method(num-1) and if num = 1, then 1 + (1-1) = 1.
@user9741
@user9741 11 жыл бұрын
wow, you're first example was all I needed to break the barrier. Thanks!
@thecomempire
@thecomempire 10 жыл бұрын
Hi Derik- I just wanted to say thank you for all your fantastic videos- they have really assisted me in my studies! No need to sit and read the textbook anymore!
@derekbanas
@derekbanas 10 жыл бұрын
Hi, I'm very happy to hear that I could help. You're very welcome :)
@derekbanas
@derekbanas 11 жыл бұрын
It is actually pretty easy after a while. Is it worth it? That depends on what you mean by worth I guess :) I very much enjoy helping people and most people are extremely nice.
@derekbanas
@derekbanas 11 жыл бұрын
Thank you very much :) Your teacher probably just doesn't like his job. I think the worst thing in the world is being forced to work in a job that one dislikes. I'll do my best to fill in the gaps that your teacher misses
@tpr_iv
@tpr_iv 8 жыл бұрын
You are awesome dude. Thank you so much for doing these. I'm starting to realize the necessity for self-teaching in the computer science major, and these help loads.
@derekbanas
@derekbanas 8 жыл бұрын
+Tom Reilly Thank you :) I'm happy I could help
@derekbanas
@derekbanas 11 жыл бұрын
I've used pretty much every language at one point or another.
@bigshaqsmathematicalinstit3318
@bigshaqsmathematicalinstit3318 4 жыл бұрын
Just simply amazing. I believe college professors are experts in their fields of study, but some are not cut out to be a educator.
@derekbanas
@derekbanas 4 жыл бұрын
Thank you :) I'm happy I could help
@mezcop412
@mezcop412 9 жыл бұрын
Has anybody else covered Java as well as you have? I remember watching one of your videos at the end of 2013 (for easy code involving HTML / CSS, and so on). I'm becoming obsessed with code and I want everything out of it.
@derekbanas
@derekbanas 9 жыл бұрын
Mez Cop Thank you for the nice compliment :) I guess I have the most popular Java videos. I'm very proud of that!
@seemsas
@seemsas 11 жыл бұрын
Thanks Derek, for one more illustrative tutorial! Before, I only had a kind of vague idea of recursion but now, I believe to understand it better. I'm looking forward to the sorting methods...
@danisburner2249
@danisburner2249 8 жыл бұрын
Just so you know the dashes confused me really bad as I thought they were minus signs
@derekbanas
@derekbanas 8 жыл бұрын
+Dan En Sorry about that
@paulodeleon1715
@paulodeleon1715 4 жыл бұрын
You earned another subscriber! Thank you so much! In only just 2 mins i did understand it more than my purchased course in Udemy! Thank you very much!
@derekbanas
@derekbanas 4 жыл бұрын
Thank you very much :) Happy I could help
@derekbanas
@derekbanas 11 жыл бұрын
Thank you very much :) Ill be making java related tutorials for quite a bit longer. I hope you enjoy them
@Jpgmeg
@Jpgmeg 8 жыл бұрын
Very impressed with the quality of these videos! I'm a software engineering student, and these videos are great helpers!
@derekbanas
@derekbanas 8 жыл бұрын
+Megan Doherty Thank you :) I'm happy that you like them.
@derekbanas
@derekbanas 11 жыл бұрын
That will be covered after my next video on the shell and quick sort :)
@jimbotime123
@jimbotime123 6 жыл бұрын
0:00 - 2:04, Explained it better than every other video
@KETANRAMTEKE
@KETANRAMTEKE 7 жыл бұрын
Derek thank you so much. KZbin is awesome because of the content creators likes you.
@derekbanas
@derekbanas 7 жыл бұрын
Thank you for the nice compliment :)
@paratek_io
@paratek_io 9 жыл бұрын
I learn more from these videos than I do in my Uni courses. Thanks!
@derekbanas
@derekbanas 9 жыл бұрын
JackRabbit Thank you :) I'm happy I could help.
@kereshannaidoo2626
@kereshannaidoo2626 9 жыл бұрын
same for me lol
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) it is very gratifying to help people
@MegaGangsta4life
@MegaGangsta4life 10 жыл бұрын
I have a quiz tommorrow in APCS thx for the help xD
@derekbanas
@derekbanas 10 жыл бұрын
You're very welcome :) Good luck on your test.
@MegaGangsta4life
@MegaGangsta4life 10 жыл бұрын
I failed the test btw xD
@derekbanas
@derekbanas 10 жыл бұрын
MegaGangsta4life I'm sorry to hear that. I always considered failing to be a good thing though because I then focus and move on. Keep at it and you'll do fine. If I can do this stuff so can you. I wish you all the best :)
@MegaGangsta4life
@MegaGangsta4life 10 жыл бұрын
Derek Banas I am an indie game developer, and I program a lot, I took AP Comp Sci because I thought it would help me. I was wrong xD I fail all the test and copy/paste other people`s code just to get a B in the class :P I enjoy programming and Ive made 3 games, I just despise my class. But your tutorials do help a lot
@derekbanas
@derekbanas 10 жыл бұрын
MegaGangsta4life Keep at it. When the student fails it isn't the fault of the student it is the fault of the teacher. Never let the failings of others define you. For some reason in this day in age teachers believe their job is to force students to fail. I think that is lazy. I see no reason to idolize lazy people either :) Only through failure do we appreciate success. The only people that deserve success are those who struggle to find it.
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) That is very kind.
@crazypigs100
@crazypigs100 9 жыл бұрын
Thankyou for posting this! My lecture did not explain this well haha. Hopefully I can one day be able to make videos and help others!
@derekbanas
@derekbanas 9 жыл бұрын
crazypigs100 You're very welcome :) I'm glad I could help
@claremacdonald7358
@claremacdonald7358 8 жыл бұрын
you sound like andy from the office and i love it
@derekbanas
@derekbanas 8 жыл бұрын
+Clare MacDonald Thank you :) I hear that all of the time
@newmagicfilms
@newmagicfilms 7 жыл бұрын
Why we need recursion if we have "while" or "if" ? Can you explain?
@derekbanas
@derekbanas 7 жыл бұрын
In certain situations recursion makes for dramatically shorter and actually easier to understand code. One common use is with web crawlers. You go to the site and find all the links. You then follow all those links to other completely different pages. This continues forever until you finally come to the end of the line and cycle back to the original page. This would be impossible to do with normal looping, but recursively it is quite straight forward.
@NusaybaMoft
@NusaybaMoft 10 жыл бұрын
u go way too fast :/
@lordspotato5032
@lordspotato5032 4 жыл бұрын
@@_________________404 LOL Liao was talking about her reply to the comment
@theelvensong4328
@theelvensong4328 4 жыл бұрын
If it goes too fast, you can pause the video and/or go back. Also, watching other videos on related topics like triangular numbers, etc, can help. I do the same.
@anthonyani1631
@anthonyani1631 5 жыл бұрын
I said to myself 'I wish I could double like' . Very nice video! You just got a new follower
@derekbanas
@derekbanas 5 жыл бұрын
Thank you very much :)
@derekbanas
@derekbanas 11 жыл бұрын
I'll see how soon I can cover that
@CC-bm3wb
@CC-bm3wb 6 жыл бұрын
You sound like Andy Bernard from the Office. Also, thanks for the video explaining recursion, this makes a lot more sense to me seeing what happens at each step :)
@derekbanas
@derekbanas 6 жыл бұрын
I'm happy it helped :) I get compared to Nard Dog all the time
@NeverMyRealName
@NeverMyRealName 11 жыл бұрын
you are awesome man. you're videos helped me re-learn these basic programming concepts! keep it up.
@derekbanas
@derekbanas 11 жыл бұрын
Yes that would be another candidate for recursion :)
@blockbusterlatefees7713
@blockbusterlatefees7713 5 жыл бұрын
I'm watching this once every day until it's burnt into my brain.
@derekbanas
@derekbanas 5 жыл бұрын
I hope it helps :)
@derekbanas
@derekbanas 11 жыл бұрын
You're very welcome :) Thank you
@MegaVuhung
@MegaVuhung 11 жыл бұрын
That's really encourage me to keep on coding (must admit that it's really boring sometimes) Thks anyway!
@derekbanas
@derekbanas 11 жыл бұрын
I used to be able to speak German and could read and write Chinese and Japanese, but I've since forgotten most of it
@coolstuffinlocker
@coolstuffinlocker 7 жыл бұрын
I wish I could explain stuff like this guy does.
@derekbanas
@derekbanas 7 жыл бұрын
Thanks for the compliment :)
@brunomalmsteen
@brunomalmsteen 9 жыл бұрын
Hey Derek, how are you doing? Is is possible to change your code to implement towers of Hanoi and build a trace just like the ones you did for factorial and triangular number? By the way, one of the best videos on this subject available ;)
@MegaVuhung
@MegaVuhung 11 жыл бұрын
U r really excellent at coding so Can u tell me how much time do u spend to learn or writing code( or sth like that) a day?
@matthewsagen7243
@matthewsagen7243 8 жыл бұрын
Great video, it moved a little fast for me, once you got into triangular numbers.
@derekbanas
@derekbanas 8 жыл бұрын
+Matthew Sagen Thank you :) Sorry about the speed
@azokennedy20
@azokennedy20 7 жыл бұрын
Thanks again Derek. Much clearer now.
@derekbanas
@derekbanas 7 жыл бұрын
Great I'm glad it helped :)
@ruimenghu9447
@ruimenghu9447 11 жыл бұрын
these is my dream lecture, Thanks for your patient help.
@yourface13able
@yourface13able 5 жыл бұрын
I wish I found this guy at the beginning of my semester
@derekbanas
@derekbanas 11 жыл бұрын
Mimi najua lugha ya programu nyingi lakini wachache sana zinazozungumzwa. Mimi kamwe kuongea na watu katika ulimwengu halisi hivyo mimi kidogo kutumia kwa ajili yao :)
@shilpinator
@shilpinator 11 жыл бұрын
Thanks for the help. Its unfortunate that after paying thousands of dollars of tuition to universities, they can only provide us with professors who are incapable of teaching, and we have to come to places like KZbin and hope that there are better instructors out there willing to help us out for 'free'.
@blackfay0
@blackfay0 4 жыл бұрын
Thanks! It has helped me understand the devilish recursion.
@derekbanas
@derekbanas 11 жыл бұрын
Вы начали тенденция :) Вы очень приветствуются. Я делаю видео как можно быстрее. К сожалению она так долго
@123japanuser
@123japanuser 11 жыл бұрын
Hallo liebe Trainer, Das ist eine schwierige Thema zu lernen. Dank Ihnen wird es nicht ein Problem in der Zukunft sein. Ich bin froh, wieder Gold zu gewinnen :) :) Ich bin der aredent Schüler von Ihnen. vielen Dank
@anjulishukla1189
@anjulishukla1189 7 жыл бұрын
can u tell me how to sum a fibonacci series by recursion only in java... please
@prasoonpandey1184
@prasoonpandey1184 7 жыл бұрын
Thanks sir. The explanation of the recursive methods was very good and it made it easier for me to understand that. Though, the later portion of the video was too complicated for me. Thank you for the video. I guess I will also use the same way as you to teach my viewers about recursion. Cheers 👏
@derekbanas
@derekbanas 7 жыл бұрын
I'm very happy that it helped :)
@prasoonpandey1184
@prasoonpandey1184 7 жыл бұрын
😄
@alkhirgoodness
@alkhirgoodness 11 жыл бұрын
This is just terific . Please continue doing this great job My besr wishes
@ankurpaliwal9713
@ankurpaliwal9713 5 жыл бұрын
nice explanation Can you also create a tutorial on using recursion in trees where recusrion is used more than once in a method?
@derekbanas
@derekbanas 5 жыл бұрын
Thank you :) I'll see what I can do
@John-shreds
@John-shreds 7 жыл бұрын
Awsome, but these examples all had a base case of one. Could you do an extra video for recursion problems with more than one base case? Also, could you cover recursive permutation as well? Where you can print out every possible combinations for letters in a word?
@derekbanas
@derekbanas 7 жыл бұрын
I'll see what I can do
@John-shreds
@John-shreds 7 жыл бұрын
sweet!
@roul3688
@roul3688 6 жыл бұрын
A little fast for me but thanks for the video. Glad I have a pause button
@derekbanas
@derekbanas 6 жыл бұрын
I'm glad it helped :)
@PuneethBedre
@PuneethBedre 11 жыл бұрын
this helped to some extent, but im unable to apply myself in order to trace the recursion algorithm for Towers Of Henoi. It'd be nice to have you explain that.
@youtubeaccount0x073
@youtubeaccount0x073 5 жыл бұрын
It would help me so much if you did a real life example with out using factorials and triangular numbers
@aliwally1323
@aliwally1323 2 жыл бұрын
In the box model representation of the first problem (getTriNum) , wouldn't the return of the call getTriNum(1) simply yield the result of 1 rather than the result of the computation of 1 + getTriNum(1 - 1) since the method checks to see if n is equal to 1. If n == 1, there is no recursive call made, the method just returns 1.
@Simon_Alexnder
@Simon_Alexnder 3 жыл бұрын
Its time for another "Good Idea / Bad Idea" Good Idea: using Recursion with stopping condition; Bad Idea: Bad Idea: exception stackoverflow;
@jamessoul3221
@jamessoul3221 5 жыл бұрын
Hey Derek, Just a question: in your method printHorzArray, why are the first two integers being passed into the first two parameters -1? Thanks in advanced.
@circuitfreak24
@circuitfreak24 11 жыл бұрын
Great tutorial! I hope you'll cover Dijkstra's algorithm in the upcoming videos :)
@mayachandra3734
@mayachandra3734 9 жыл бұрын
How do you talk so damn fast?
@jackdewipper187
@jackdewipper187 6 жыл бұрын
goes way too fast for a beginner
@nathantaal96
@nathantaal96 6 жыл бұрын
Crypto Amirates Watch at 0.75
@romerome8892
@romerome8892 5 жыл бұрын
It's fine because it's a video and u can rewind any time.
@mylifeassaifi1708
@mylifeassaifi1708 8 жыл бұрын
Thanks ....your voice is so catchy .
@derekbanas
@derekbanas 8 жыл бұрын
Thank you for the compliment :)
@coolio4843
@coolio4843 9 жыл бұрын
Love your videos! Just have one question involving strings in recursion. When you do the substring of a word do you add it all together? Let's say it's x + f(x.substring(4)). Would you add the word to the substring? Sorry if that's confusing thanks!
@flowersunny719
@flowersunny719 5 жыл бұрын
Hi Derek, I think the first two "int" arguments in the "printHorzArray" method are not necessary. Could you explain why you put them there? I think you must have some good reasons for that.
@dwc500
@dwc500 9 жыл бұрын
how would you call a recursion function that returns the number of zero digits in the non-negative number that someone entered?
@ssj4rit
@ssj4rit 8 жыл бұрын
Do something like converting the number parameter to a string. Then use two conditionals. If the first character is not 0, call the function with the parameter as the number string without the first digit. Else, return 1+ function without the first digit in the string. Remember to cast this string back to an int. Your base case should probably take into consideration if number
@AroundWayOther
@AroundWayOther 9 жыл бұрын
Hi Derek, do you have any videos on recursive backtracing? If not, where can I look to learn about it?
@derekbanas
@derekbanas 9 жыл бұрын
BKexplorer Here is a nice example www.dreamincode.net/forums/topic/258287-a-look-at-backtracking/
@AroundWayOther
@AroundWayOther 9 жыл бұрын
Thank you so much!
Java Shell Sort
11:01
Derek Banas
Рет қаралды 78 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,2 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 124 МЛН
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 42 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 11 МЛН
Recursion Java Tutorial #69
9:07
Alex Lee
Рет қаралды 296 М.
Java Quick Sort
18:29
Derek Banas
Рет қаралды 149 М.
What on Earth is Recursion? - Computerphile
9:40
Computerphile
Рет қаралды 744 М.
Tutorial 18 - Recursion in Java
8:00
Java Tutorials
Рет қаралды 23 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 806 М.
How To Think Like A Programmer
1:00:07
Coding Tech
Рет қаралды 2 МЛН
Recursion in Java
29:23
Simply Coding
Рет қаралды 10 М.
This is a Better Way to Understand Recursion
4:03
Alex Hyett
Рет қаралды 42 М.
Merge Sort Algorithm in Java - Full Tutorial with Source
23:02
Coding with John
Рет қаралды 177 М.
Solving Programming Problems 2
18:05
Derek Banas
Рет қаралды 36 М.
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 124 МЛН