Название | : | 5 Simple Steps for Solving Any Recursive Problem |
Продолжительность | : | 21.03 |
Дата публикации | : | |
Просмотров | : | 1 jt |
|
nice video 👌👌 Comment from : @appu6517 |
|
i hate recursion more now, after watching this video Comment from : @user-si7dx7mc4m |
|
thanks , change the music next time please Comment from : @ChakibStudentHamada |
|
Its good, but why n and m, I can't always hear the difference, why not z and q? Comment from : @marcuswest4572 |
|
your first problem is very close to 15th Project Euler problem! ;) Comment from : @dilipisharayt |
|
hello, I loved your video and I would like to know how you do the animations of the arrangements and such, what kind of tools and/or technologies do you use? Comment from : @leandromarcelo2340 |
|
The second example was poorly explained :/ Comment from : @rootshell101 |
|
Recursion is not bad The part of figuring out how to not do recursion or spending the rest of your life watching it process is Comment from : @Yupppi |
|
Okay I also don't understand why the simplest case for the grid problem is 1,1 while for the partition it's 0,0 Why can't grids be 0,0 if same logic is applied? Comment from : @hashir7401 |
|
It was wholesome brilliant Thank you Comment from : @user-sz9nt3vz7k |
|
I still don't get it I'm too stupid for CS Comment from : @amorfati4559 |
|
the graph at 12:12 is hard to understand, and there's not much explanation Comment from : @fruematsutani |
|
this is byfar the best video ive ever watched on any CS topic whatsoever, keep up the good work!! Comment from : @user-rr7xc9ih3r |
|
5:07 Comment from : @xeniosgerolemou6061 |
|
RECURSIVE LEAP OF FATEE Comment from : @user-ej9pe2fw6x |
|
God, i feel so dumb Comment from : @victorsenaxD |
|
You sound exactly like Zackstar Comment from : @TheKimpula |
|
Nice music, animation and explanation Comment from : @vistum_web |
|
I just asking Are you Mark Rober behind the microphone?brYour explanation is phenomenal just like Mark's brThanks for this comprehensive video on recursion Comment from : @montysark |
|
M8 I love u Comment from : @tellom8375 |
|
So diffcult Ima quit Comment from : @loledison9344 |
|
Thanks, helped a lot to understand recursion Comment from : @user-hw1vx4ej1z |
|
You just virtually fked my mind with the 3rd question Comment from : @deepesh16b |
|
bro stop stealing 3blue1brown art style Comment from : @baichenluo7880 |
|
loved the last problem; it cost me an afternoon to figure out the rule by myself, but it was worth it Comment from : @moodyFC |
|
I don’t get the partition section What does a “part” m mean? It seemed to me like that was the restriction, the max size for any group, but looking at the 7 partition one it doesn’t make sense If you can use up to 5 parts in one group, that’s all the possibilities of partitioning, no? So shouldn’t it just be the corresponding bell number? Comment from : @darcash1738 |
|
Thanks! loved the video! Comment from : @anatlevin4819 |
|
Must watch for everybody who wants to solve any problem using recursion brIt is not easy to make it easy for others, but you did it brReally appreciate your effort Comment from : @kartikpodugu |
|
You should try to avoid recursion if possible You can always create a queue or some other mechanism It might seem to add complexity, but the pros outweigh the cons in this case Recursive functions do seem simpler, because they break things down into simpler base cases and recurse up from there Some data structures really lend themselves to recursion - tree structures for example The problems with recursion are many It's going to mash your stack, function call overhead will make your code less efficient, and there's always the potential of the exit condition not working and you end up in an infinite loop which will eat up your stack quick If you are writing embedded code you should never use recursionbrbrPros of Recursive Functions:
brSimplicity and Clarity: Recursive functions can make complex problems simpler by breaking them down into more manageable sub-problems This can lead to cleaner, more readable code for problems that have a natural recursive structure, like tree traversal or solving the Fibonacci sequence
br
brReduce Code Duplication: Since the function is essentially calling itself, you can avoid repeating code blocks, potentially reducing errors and making maintenance easier
br
brNatural Fit for Certain Data Structures: Recursive functions can be a very natural way to process certain data structures, especially trees and graphs For instance, many operations on a binary tree (like depth-first search) are most easily described recursively
br
brUnified Code for Base and Recursive Cases: In many recursive functions, the base case (or terminating condition) and the recursive case can be handled within a single function, leading to a unified approach to solving the problem
br
brCons of Recursive Functions:
brStack Overflow: Recursive functions use the call stack to handle recursive calls If the depth of the recursion is too large, it can lead to a stack overflow error, crashing your program This limits the depth of the recursion you can have, especially in environments with limited stack size
br
brPerformance Overheads: Recursive calls can introduce function call overhead, especially if the recursion is deep This overhead can make recursive solutions slower than their iterative counterparts for some problems
br
brMemory Usage: Each recursive call consumes memory on the call stack This could be problematic, especially if the recursive function has a large number of local variables or the recursion depth is high
br
brHarder to Debug: For some, recursive functions can be harder to debug than iterative ones It can be challenging to trace through a deeply recursive function or understand its exact state at a particular point in the recursion
br
brNot Always Intuitive: While recursion can simplify some problems, it might not be intuitive for all programmers or for all types of problems It often requires a shift in thinking which some might find challenging
br
brPotential for Infinite Recursion: If not designed correctly with a clear base case or stopping condition, recursive functions can lead to infinite recursion, which will eventually result in a stack overflow
br
brConclusion:
brRecursive functions are a powerful tool in a programmer's toolkit, and for many problems, they offer a clear and elegant solution However, understanding their limitations and potential pitfalls is essential It's often useful to weigh the clarity and conciseness of a recursive solution against its potential performance and memory implications, especially in resource-constrained environments Comment from : @BitwiseMobile |
|
Managed to solve the last problem myself before the full video! Using the approach mentioned ofc, very helpful Comment from : @gytzero |
|
I am Dumb or what I don't understand, the last example much Comment from : @rishavpapaji5349 |
|
Seem like there at least 7 unique paths in the (2, 4) grid, and many additional paths in the other grids also Do you mean there are 4 paths in the (2, 4) grid that all have the same least number of squares to travel (5 squares)? Because there are additional unique paths that travel 6 and 7 squares Comment from : @carinayoung5618 |
|
Once, I had to solve a recursive problem (which, I can't recall) but it had to be implemented in a mixture of procedural code and a SQL language (I was using Advanced Revelation) The most difficult part was not figuring out what the recursive function was but what to code! Comment from : @wafikiri7676 |
|
background music name please ! Comment from : @tarekradwan8661 |
|
Ich fühle mich jetzt auf LSD wegen diesem Video Comment from : @montanaweise2494 |
|
thank you very much, I'm learning cs50 and strugling at recursion for 2 days, and this video help me to understand the concept after watching the first 5 mins Nice vizualization! Comment from : @ed3137 |
|
I don't usually leave comments, this was great thank you Comment from : @zahraalipour4122 |
|
🥲 is it just me or was the last problem very confusing? I didn't understand a thing in last problem Comment from : @ghoritauheed7182 |
|
As a foreigner, I'm glad someone can make recursion so clear, thank you, your video is really great Comment from : @R7CKB |
|
Nicely explained! liked it Comment from : @SharadTiwarialld |
|
Thanks Comment from : @mahimapatel8706 |
|
SPANISH PLZ Comment from : @juanmacedo8816 |
|
I still don't get it Comment from : @centipedekid9824 |
|
I m pissed at recursion I have always struggled with it For this i am scared of graph,tree,dp Whole DSA and my life is going up in flames for this topic Comment from : @ankansharma4897 |
|
I am sorry but what does it mean in 17:00 -17:30Can some one explain it? Comment from : @compasphantom6275 |
|
The video is really amazing and gives the idea to approach a problem and i love it Comment from : @Codes2Day |
|
I don't think that the concept of recursion is that difficult to understand The real problem is that it is often not well explained and that is why people struggle to grasp it This video explains it well Comment from : @JustinDAMusic |
|
how could we handle the third problem if we was asked to distinguish the partitions by the order of choice? Comment from : @aliyo5277 |
|
top tier visuals Comment from : @ecniiv |
|
Thank you so much! This is super useful Comment from : @narangfamily7668 |
|
Oh my, this is amazing man Comment from : @Ke_eK |
|
Awesome video Are there any problems similiar to this to workout? Comment from : @Jo5huaFPS |
|
If you are a functional programmer, looping needs to be done through recursion since loops inherently use mutability, which is not allowed Comment from : @vorpal22 |
|
How can we relate 2:3 and 3:2 matrices so confidentially suppose when if we start the path from, 2:3 for the first instance if we go down one unit we are covering 3:3 that i got, but how can you relate it with 3:2's matrix, it can be placed in first two column of 3:3 matrix How you are assuming it at the end ie last two column only? Comment from : @shoaibshaikh8582 |
|
This is liberating stuff!brIt's like some mental blocks are being cleared off in my head This is crazy good!brLove you, bro!!! Comment from : @t-distributedkid3825 |
|
Wonderful, brbrThank you Comment from : @HaykTarkhanyan |
|
Very helpful ❤ Comment from : @madhavkumar5725 |
|
i can't understand the last one, partition would any one explain ? Comment from : @anbarasanpm3295 |
|
thank you Comment from : @tprunuspersicav8839 |
|
These explanation opened my mind to whole new world Comment from : @amitghatage4413 |
|
Still confused Comment from : @yibyul2025 |
|
It's all fun and games until the Stack Overflow Error Comment from : @unchaynd7266 |
|
Habibi dhoom Macha diya (translate)🎉😂 Comment from : @HIMANSHUSINGHRAGHUWANSHI-pi4ox |
|
so who can explain what partition wants us to do:? Comment from : @zixinyin8399 |
|
really good video Comment from : @Mike-vj8do |
|
Damn, this is freaking beautiful to enjoy watching !!! Comment from : @SeviersKain |
|
I had been struggling to understand recursion from long You cleared my doubts Thank you very much Comment from : @pragatidharmale2733 |
|
How to solve a recursion problem:brRun it enough times until it solves itself Comment from : @Gjrcjeff |
|
Love the animation style, is this Manim? Comment from : @omaremad9125 |
|
the explanation is absolutely unique !!! Comment from : @ulugbekkirgizov452 |
|
GPT-4 can create this recursive function for the partitions - creepy and impressive Comment from : @NeonWanderer |
|
As of now, the only thing I can do to pay you back for this amazing and beautiful video explanation is to like it and share it with my Intro to Programming classmates Thank you! Comment from : @gachle |
|
This is still very hard to apply Comment from : @hungdang8088 |
|
Great work Comment from : @chinakohl2355 |
|
Was really struggling on this recursion part in my data structure course many videos i have watch but they just show you the code in java and expect us to figure it out thank you from my deepest heart may god bless instructors like you Comment from : @user-cg2nh5jy5w |
|
No way I love recursion brAlso it's bad maybe 😅 Comment from : @HolyG-sus |
|
3:05 Comment from : @anmolpanchal4493 |
|
For people struggling with recursion I would highly recommend this book: A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills brThe author gives the best and easiest explnations of recursion I've ever seen Comment from : @bogdanmazur3256 |
|
This video is really really helpful best video today really ☺️👍 Comment from : @AhmedFahim16 |
|
Thanks from Italy Comment from : @mirkodimaggio8076 |
|
Should count_partitions(0, b) return 1 for negative b? Comment from : @jellomochas |
|
Are you sure it's not 6 steps, wait no 7, I mean 8, no, 9 Comment from : @LeoH3L1 |
|
This is so well made! Comment from : @magdalenapopa16 |
|
Been learning JS for a long time and recursion is still one of the hardest things for me Im dumb Comment from : @lauris5275 |
![]() |
5 Simple Steps for Solving Dynamic Programming Problems РѕС‚ : Reducible Download Full Episodes | The Most Watched videos of all time |
![]() |
Programming Loops vs Recursion - Computerphile РѕС‚ : Computerphile Download Full Episodes | The Most Watched videos of all time |
![]() |
How to solve recursive programs РѕС‚ : Techdose Download Full Episodes | The Most Watched videos of all time |
![]() |
Recursion Practice u0026 Strategies in Python: A Tutorial on Solving Recursive Problems and Algorithms РѕС‚ : Kris Jordan Download Full Episodes | The Most Watched videos of all time |
![]() |
Learn RECURSION in 5 minutes! ? РѕС‚ : Bro Code Download Full Episodes | The Most Watched videos of all time |
![]() |
Recursion in 100 Seconds РѕС‚ : Fireship Download Full Episodes | The Most Watched videos of all time |
![]() |
B. Friendly Arrays | Codeforces Solution | CodeTON Round 6 (Div. 1 + Div. 2) | Bangla РѕС‚ : wrong submission Download Full Episodes | The Most Watched videos of all time |
![]() |
How to ACTUALLY Master Data Structures FAST (with real coding examples) РѕС‚ : Pooja Dutt Download Full Episodes | The Most Watched videos of all time |
![]() |
Recursion in 3 steps | Solve any problem | College Placement Course РѕС‚ : Apni Kaksha Download Full Episodes | The Most Watched videos of all time |
![]() |
Recursion in Programming - Full Course РѕС‚ : freeCodeCamp.org Download Full Episodes | The Most Watched videos of all time |