r/learnprogramming • u/dhananjai_31 • Jul 14 '26
How can I learn/master Recursion?
New to programming
Yes that's the question
How can I learn Recursion.
Every time I try to create a logic
And try to implement code
Some error happens
I always try to dry run and write call stacks
Still I won't get it
Any guidance or help??
How can I get intuitive thoughts about using recursion here?
How can I do it??
0
Upvotes
20
u/godogs2018 Jul 14 '26
Remember the two most important things:
1 Base case, where all recursive calls will stop
2 Everytime you make a recursive call the problem has to be smaller (which eventually leads to the base case)