Stack Overflow

Domain: Programming Fundamentals

🎯 Motivation

When recursion goes too deep or the call stack gets too big, the program crashes - stack overflow.

📋 Concrete Example

Calling factorial(1000000) without optimisation - the stack grows until it exceeds memory limits and crashes.

🔗 Analogy

Stacking too many plates - eventually the tower gets too tall and topples over. The crash is the stack overflow.