AI engineering glossary · Data structures algorithms
What is call stack?
Call stack: The region of memory that records active function calls, storing each call's local variables and return point on top of the previous one. Very deep recursion can fill it and cause a stack overflow error.
Call stack: an example
A recursive function that calls itself 1 lakh times without returning can exceed Python's default recursion limit of roughly a thousand calls.
Related terms
More Data structures algorithms terms
- Circular buffer
- Coin change problem
- Collision
- Comparison sort
- Connected components
- Consistent hashing
- Counting sort
- Cycle detection
Where you learn it
Call stack is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.