I've started learning data structures and algorithms and have been diving into recursion. However, I'm struggling to visualize how the recursive function calls work. Is there a specific method or resource you recommend to help me better understand this concept? I prefer to visualize things instead of just memorizing them.
2 Answers
A great way to get a grasp on recursion is to explore how function calls work under the hood, especially at the assembly level. Understanding how the instruction pointer and the stack function can really help clarify what happens during recursion. It might seem overwhelming, but once you get a grip on those basics, everything else, including recursion, will make more sense!
Check out this video on recursion! It covers pretty much everything you need to know: [Understanding Recursion](https://www.youtube.com/watch?v=YuaJ8x_NcLw). It might not explain all the whys of choosing recursion over iteration, but it'll definitely help you visualize how recursion works better!
Thanks for the link! I'll watch it later.

That sounds intense but useful! I'll give it a shot.