Programming (Year 12)

What is recursion and how does it work?

Recursion is a programming technique where a function calls itself to solve a problem, typically involving a base case to stop the recursion.