Learn RECURSION in 5 minutes! 😵

  Рет қаралды 189,202

Bro Code

Bro Code

Күн бұрын

Пікірлер
@BroCodez
@BroCodez 2 жыл бұрын
# recursion = a function that calls itself from within # helps to visualize a complex problem into basic steps # problems can be solved more easily iteratively or recursively # iterative = faster, complex # recursive = slower, simpler # ----- EXAMPLE 1 ----- # ITERATIVE def walk(steps): for step in range(1, steps+1): print(f"You take step #{step}") # RECURSIVE def walk(steps): if steps == 0: return walk(steps - 1) print(f"You take step #{steps}") walk(100) # ----- EXAMPLE 2 ----- # ITERATIVE def factorial(x): result = 1 if x > 0: for i in range(1, x + 1): result *= i return result # RECURSIVE def factorial(x): if x == 1: return 1 else: return x * factorial(x - 1) print(factorial(10))
@ЙирюВонаирда
@ЙирюВонаирда 2 жыл бұрын
does it even make sense? I mean... why choose recursive way to solve a matter? Is there any advantages outside of simplification? Mb memory consumption or speed? Why use it if u dont mind complex code? Any example where recursion gave a more suited solution than iterative way?
@captainhostile101
@captainhostile101 Жыл бұрын
@@ЙирюВонаирда i sure need em for tomorrows exam
@recursion.
@recursion. Ай бұрын
Good to see so many people interested in me🥰🥰🥰
@AvidAfrican
@AvidAfrican Ай бұрын
😂😂
@OceanLover8008
@OceanLover8008 2 жыл бұрын
Thanks bro for always uploading extremely useful content for free. I'm a student right now and I really appreciate all the efforts that you are taking. ❤️ Proud to be a 'Bro'. 😎
@BroCodez
@BroCodez 2 жыл бұрын
thanks for watching 😎
@itayzabar2953
@itayzabar2953 2 жыл бұрын
Hi Bro Code! I'm studying computer science in highschool rn and after two month learning how to use recursion i am still struggling. I think that your video on it might gave me some crucial insights about the topic and the usage of it. Thank you so much❤️ I rly like your videos so keep creating great content!! Have a great day!
@Loco4Waffles
@Loco4Waffles 9 ай бұрын
Best example I have seen on explaining recursion
@zabehullahalizadeh2310
@zabehullahalizadeh2310 2 жыл бұрын
Learn python with Bro is as enjoyable as playing our favorite games
@mihailomilenkovic6382
@mihailomilenkovic6382 2 жыл бұрын
True
@randymartin9040
@randymartin9040 3 ай бұрын
This taught me something about the stack and how code functions that I haven't learned from anywhere else, invaluable. Thank you! Blessings.
@ssmith5048
@ssmith5048 2 жыл бұрын
Excellent explanation and examples!
@t2trix1
@t2trix1 22 күн бұрын
This is the first time I've kind of understood recursion, the minecraft visual and the code comparison to the loop in this video specically is great
@salihmorta4172
@salihmorta4172 11 ай бұрын
This is the best BEST explanation for recursion I’ve ever heard
@shoukatiqbal5674
@shoukatiqbal5674 2 ай бұрын
very impressive demonstration well done Sir
@edipedipbulmaz
@edipedipbulmaz 2 жыл бұрын
I just wanted to thank you. For teaching me programming and starting my coding career. Tanks again.
@Wolfoffreedom111
@Wolfoffreedom111 2 жыл бұрын
Great 👍
@eddisonlewis8099
@eddisonlewis8099 Жыл бұрын
Very interesting illustration
@fluffyisyermom7631
@fluffyisyermom7631 11 ай бұрын
Bro is the g. Ty my friend. When other KZbinrs fail to deliver an answer that is simple and easy to understand, you come in and kill it. ❤ I was stuck on this for an hour before trying this video. But man I wish I knew this a month ago 😂
@randymartin9040
@randymartin9040 3 ай бұрын
Cool way of understanding this, thank you.
@audiemolinger6450
@audiemolinger6450 8 ай бұрын
Great course, great instructor
@farhisoki4805
@farhisoki4805 Ай бұрын
Help a lot, thanks
@chrisogonas
@chrisogonas 4 ай бұрын
Very well illustrated! Thanks
@kadirv
@kadirv 10 ай бұрын
excellent. well clarified 👏👏
@anshhmalviyaa
@anshhmalviyaa Жыл бұрын
Best channel for learning to program on KZbin. ❤
@harley_randelo
@harley_randelo 2 жыл бұрын
great video. thanks for uploading. and btw, first
@flashplaysyt5719
@flashplaysyt5719 2 жыл бұрын
It is seems very essy to learn with you thanks for making videos
@onter
@onter 7 ай бұрын
really well explained, good stuff
@Daniyar-AbuUmar
@Daniyar-AbuUmar Жыл бұрын
Subscribed and liked without even thinking twice
@Geniuspaul-Projects
@Geniuspaul-Projects 2 жыл бұрын
thanks allot for your help
@calmlivingclub
@calmlivingclub 2 жыл бұрын
Great sharing
@OllyCybSec
@OllyCybSec 8 ай бұрын
Thank You and Salute to @Bro Code‼️. I watched the entire 106 video playlist of Python. Brilliantly demonstrated and explained. 🏆🏆🏆
@abhisaragarwal9084
@abhisaragarwal9084 2 жыл бұрын
Sir your videos are very good thnx for uploading programming language tutorials for free.
@codecaine
@codecaine Жыл бұрын
Keep up the excellent work
@salamvip7145
@salamvip7145 2 жыл бұрын
👍 Good
@Osamu_GWAD
@Osamu_GWAD 2 жыл бұрын
Good job!!! 🤝
@induminidilukshaWijesinghe
@induminidilukshaWijesinghe 2 жыл бұрын
Mah bro , Thanks a bunch ❤️💐
@EmilioAt77
@EmilioAt77 4 ай бұрын
As always, you are the best, Bro 🤝🏻🤝🏻
@杨玄-v4k
@杨玄-v4k 11 ай бұрын
really helpful thanks bro
@SoundKing
@SoundKing 2 жыл бұрын
Hi Code Bro from what I can see, you are the most thorough and clear person teaching coding on KZbin. Whatever your teaching style it matches my learning style. Is there any chance that you can do a full course on React?
@piotrkopcewicz5227
@piotrkopcewicz5227 2 жыл бұрын
great as usual !! thanks
@bryce3851
@bryce3851 8 ай бұрын
This has showed me the important part for data analysis thanks bro 🙏
@MarcosBilly-x7y
@MarcosBilly-x7y Жыл бұрын
cool video)
@fredcunningham8049
@fredcunningham8049 11 ай бұрын
Great tut, thanks!
@yashvashist5347
@yashvashist5347 2 жыл бұрын
Thanks bro❤️✨
@tictactechin
@tictactechin Жыл бұрын
from this video i learn that programming is solving your own error code problem while trying to achieve your goal code
@abdulhannan-18
@abdulhannan-18 Жыл бұрын
def add(*args): total = 0 for arg in args: total = total + arg return total print(add(1,2,3,4,5,6,7)) 28
@ZyrusAlvez
@ZyrusAlvez 10 ай бұрын
Thank you. No one told me that the best way to understand recursion is first understanding the stack
@hxhchimeraantarc2268
@hxhchimeraantarc2268 2 жыл бұрын
I am studying for finals right now and your videos are the best. You are so good at explaining. Thank you so much.
@abdulhannan-18
@abdulhannan-18 Жыл бұрын
def walk(steps): for step in range(1, steps+1): print(step, end=" ") walk(18) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
@MalaPalabra-zr6wg
@MalaPalabra-zr6wg Жыл бұрын
I'm a student of Telecommunications engineering, and I made Calculus Lambda with Haskell to improve my programmation abilities. And thanks to that elective I learnt how to use recursive.
@BüblySnowfláke-m3x
@BüblySnowfláke-m3x 7 ай бұрын
Who's watching dis in 2024,love all ur tutorials bro❤
@prizepig
@prizepig 2 жыл бұрын
Just when I thought I was out, they pulled me back in.
@julia-kc3kp
@julia-kc3kp Жыл бұрын
hey! just realized i'm your 850,000st subscriber 🥳 love this channel, you are doing something very valuable and precious here. thank you for being an absolute bro!
@tigerli2262
@tigerli2262 9 ай бұрын
love it
@TheKr0ckeR
@TheKr0ckeR 9 ай бұрын
For 1 year later, learning 8 min tutorial decreased to 5 min. :D Thanks for the tutorial
@francescodiniccolo
@francescodiniccolo 4 ай бұрын
Thanks Bro, that was a great explanation Bro
@kristijanlazarev
@kristijanlazarev 10 ай бұрын
Finished in a less than a week, even though I work a full time job, very good course!
@Simonjoel-469
@Simonjoel-469 6 ай бұрын
I really enjoyed watching your videos but I think you should share your resources pls...!!
@sweet_coconut
@sweet_coconut 2 жыл бұрын
thank you! now recursion is a bit clearer to me :)
@marshmelows
@marshmelows 2 жыл бұрын
I'm amazed how the recursive approach tends to be simpler to write. Thanks Bro Code!
@abdulhannan-18
@abdulhannan-18 Жыл бұрын
def walk(steps): if steps == 0: return walk(steps - 1) print(steps) walk(18) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
@AntonSobolev
@AntonSobolev 2 жыл бұрын
nice
@OBGCORP
@OBGCORP Жыл бұрын
Hey man, love your videos! Watched all the playlist to have a clear understanding when I get asked an algorithm question in an interview. However, I am struggling to find all the permutations of a given string and return the permutations in an array. Could you please make a video about it where you explain the recursion we use there in depth? (in Java please) Thank you...
@sinankodur4251
@sinankodur4251 Жыл бұрын
Bro you are the best I am without words bro, your examples are perfect Anyone can learn coding with this Great work and big fan of you
@Nishitha_Jay
@Nishitha_Jay 9 ай бұрын
Thanks alot for this my Bro. You are a true BRO. ❤
@poi9696
@poi9696 3 ай бұрын
✨✨
@tilkesh
@tilkesh Жыл бұрын
Thx
@rockey5508
@rockey5508 2 жыл бұрын
I'm glad I found Bro Code, I'm still learning but Bro Code makes coding easy to learn.
@malvernmabvira1562
@malvernmabvira1562 2 жыл бұрын
1:47 no brackets to define scope of a function. Java for me.
@sirwinkiebinkie8270
@sirwinkiebinkie8270 Жыл бұрын
You should add a positive only condition for the factorial in the recursice function :)
@BlahblAHbLaH-1_
@BlahblAHbLaH-1_ Жыл бұрын
w vid
@arsacode6145
@arsacode6145 Жыл бұрын
you're doing gods work, bro
@realitybeckons4120
@realitybeckons4120 Жыл бұрын
Thank you
@Vue-daigle
@Vue-daigle Жыл бұрын
Hi Bro, thanks for all the work you've put into these tutorials.
@GhostGaming-tt9tu
@GhostGaming-tt9tu Ай бұрын
You are a legend
@AlexTerrable
@AlexTerrable Жыл бұрын
Thanks bro
@BlountForceTrauma
@BlountForceTrauma 11 ай бұрын
Thank you!
@nik4465
@nik4465 Жыл бұрын
Thank you, Bro😎
@RexMan04
@RexMan04 Жыл бұрын
Got my comp sci final in 1 hour and couldn't for the life of me figure out recursion before this (its 40% of my final). I think I understand it better now, and this should help me a lot!
@Chocolatey24
@Chocolatey24 10 ай бұрын
BROOO!! Finally I understand recursion 😂
@keldur16
@keldur16 Жыл бұрын
I understand what recursion is. I am struggling to understand why I would use it Love your videos tho. You’re always a major help.
@AbelBen-fz6hs
@AbelBen-fz6hs 8 ай бұрын
sick video dog. got 89% for my test just from this video
@mdayubali9751
@mdayubali9751 2 жыл бұрын
could you please make devops or aws videos please......!
@ohChardy
@ohChardy 7 ай бұрын
last video of the playlist
@AayushBashyal1
@AayushBashyal1 5 ай бұрын
was it worth the watch?
@FaraDuMatin
@FaraDuMatin 2 жыл бұрын
Bruh I just saw that in class on week ago and didn’t understood shit. You are a wizard my guy.
@Jess-xg7ok
@Jess-xg7ok Жыл бұрын
I like the style of your video and the examples and the sample code. I am wondering if you can do the tutorial on Python Panda, NumPy, and others that are more commonly used in data analysis/data science? Thanks!
@Vue-daigle
@Vue-daigle Жыл бұрын
Thks Bro, great Python videos simply explaining all these features of the language ... 😎 Would you consider moving on to commonly used frameworks like Flask + Strapi ? They seem to be complementary and powerfull for Web dev. (=
@ameyagupta7285
@ameyagupta7285 Жыл бұрын
tysm!
@QhY-j2e
@QhY-j2e 5 ай бұрын
Hi bro, may i ask the logic behind how at 2:28 changing the print function to below walk (steps -1) makes the counter go forward? i cant seem to wrap my head around it
@ThomasC-e8i
@ThomasC-e8i Ай бұрын
do you understand now?
@techdoors1799
@techdoors1799 2 жыл бұрын
Hey bro, I love your logo.
@informativecontent4778
@informativecontent4778 Ай бұрын
An easier approach to understand and solve finding the factorial of a number using recursion number, result = int(input("Enter Any Number")), 1 # both of these are global variables def fact(num): global result # to access and modify value of a global variable in python if num == 1: return result *= num # we need to use global keyword and here we are telling the function to change # the value of result globally fact(num - 1) fact(number)
@heinrichsmit2
@heinrichsmit2 2 жыл бұрын
Hey bro, was wondering if you could show us how to make our own JDK? That way one can conveniently use heaps of code without having to actually add libraries and modules when starting a fresh project. So we wouldn't be replacing JDK 19 but just adding our JDK to the IDE with our few packages we have in there to use.
@sohelqureshi4183
@sohelqureshi4183 2 жыл бұрын
Sir you're can Please make video for django python course or playlist
@nxthingbutv0id958
@nxthingbutv0id958 2 жыл бұрын
I’m the future, please do a series on rust
@KnightZephyr
@KnightZephyr 2 жыл бұрын
random comment to help a fellow bro
@zohahs5276
@zohahs5276 2 жыл бұрын
nice one can you please also mention link to the complete playlist to which this video belongs its hard to find the playlist where I can check out other videos. I will add one like for the youtube prayer algo now thanks.
@phamducphutrong
@phamducphutrong 2 жыл бұрын
Why youtube does not provide the ability to help viewer knows which playlist that the currently video belongs to? I must see the code inside the video and see the hastag name to guess the playlist while the author have added that video into specefic playlist!
@kristheog8546
@kristheog8546 2 жыл бұрын
Hi sir, are you planning to make a tutorial for Lua language? thanks in advance
@nicolewynne4781
@nicolewynne4781 2 жыл бұрын
please could you do PHP full course bro? love you brooo
@hamidgholami2683
@hamidgholami2683 2 жыл бұрын
Hello bro what do you think about chat gpt? will it replace devs?!
@M4LAZE
@M4LAZE 2 жыл бұрын
Can you make videos on unity
@lrukfguel9860
@lrukfguel9860 2 жыл бұрын
where is your gaming channel :(
@alexz0202
@alexz0202 2 жыл бұрын
First!
Generate random numbers in Python 🎲
8:03
Bro Code
Рет қаралды 75 М.
Code Breakdown #35 - Plus One - Leetcode - Python
19:31
Dean Greer
Рет қаралды 50
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,3 МЛН
Learn Quick Sort in 13 minutes ⚡
13:49
Bro Code
Рет қаралды 422 М.
I Made My Own Programming Language
10:20
CodeNoodles
Рет қаралды 101 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 337 М.
Recursion for Python Beginners with Recursive Function Examples
17:54
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 311 М.
Learn Merge Sort in 13 minutes 🔪
13:45
Bro Code
Рет қаралды 364 М.
Towers of Hanoi: A Complete Recursive Visualization
21:13
Reducible
Рет қаралды 505 М.
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 159 М.