Glossary term
What is stack? Meaning for developers
In DSA
A pile where you add and remove only at the top: last in, first out. An array with push and pop is a stack. So is the call stack of function calls.
Learn it properly · DSALesson 38: StacksLast in, first out. Examples: valid brackets, a stack that knows its minimum, and working out expressions.In CS Foundations
The memory area that holds one frame per active function call. Too many nested calls cause a stack overflow.
Learn it properly · CS FoundationsLesson 0: How a Computer Runs Your ProgramFrom source code to machine code: compiling, interpreting and JIT, the stack and the heap, function calls, stack overflow and garbage collection.