Recursion? Recursion. Recursion is really cool. No, seriously. It's like inception. It's probably the best way to describe it. Within a function, we call the function itself. And we do so until we reach the base case of a function. Mind you, every time we call the function, the input has to be different in some form, usually shorter or smaller than the previous input. Recursion has been fairly easy, but with the introduction of binary trees and linked lists, suddenly it has become super hectic. If tracing it wasn't enough, you have things like linked lists which is recursive itself (the tail is the head of another linked list), so you have to deal with like double recursion. Double inception. Woah.
To be more in-depth about recursion, the idea is that we take a problem, and we work at it continuously with the same method, but on a smaller scale each time, until the problem becomes so small, that it is easily dealt with. Now when we work backwards, these small solutions add up back into a big solution. We work with the problem recursively. At times it may be difficult to visually see how it works, but once you get in the mindset of it, it becomes very easy and useful.
To be more in-depth about recursion, the idea is that we take a problem, and we work at it continuously with the same method, but on a smaller scale each time, until the problem becomes so small, that it is easily dealt with. Now when we work backwards, these small solutions add up back into a big solution. We work with the problem recursively. At times it may be difficult to visually see how it works, but once you get in the mindset of it, it becomes very easy and useful.