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.

Level: intermediateTopic: Data structures algorithms

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.