Explain recursion with one analogy.
Recursion is when something solves a problem by doing a smaller version of the same thing. **Analogy:** Imagine standing between two mirrors facing each other. You see an image of yourself, and inside that image is another image of yourself, and inside that another, repeating smaller and smaller. That’s like recursion: a function “calls itself” on a smaller version of the problem, until it reaches a stopping point. - **Repeated pattern:** each mirror image contains another image - **Smaller version each time:** the images get smaller - **Stopping point:** eventually the images fade so you don’t keep noticing more In programming, recursion works the same way: 1. Do a small part of the work 2. Call the same function on a smaller problem 3. Stop at a **base case** so it doesn’t continue forever If you want, I can also show a tiny code example.