ToMotion AI logo
Menu
Back to gallery

Public AI explainer video

Recursion with Nesting Dolls

Imagine a set of nesting dolls. You open the biggest doll, and inside is a smaller doll that looks almost the same. Open that one, and there’s another,...

Prompt

Source idea used to generate this video.

Recursion explained to a kid using nesting doll example

Narration

Narration used to create this video.

Video narration

Imagine a set of nesting dolls. You open the biggest doll, and inside is a smaller doll that looks almost the same. Open that one, and there’s another, and another. That “same thing inside itself” idea is recursion. Recursion is when something solves a problem by using a smaller version of the same problem. Like: “To find what’s inside, open a doll… and then open the next doll the same way.” But recursion also needs a stopping point, called a base case. With dolls, it’s the tiniest doll that doesn’t open. That’s how you know you’re done. So remember: recursion is repeating the same steps on smaller and smaller pieces, until you reach the smallest piece and stop.