Asked by: Zoha Tazmen

What is a stack?

Answers (1)

A stack is a data structure that follows the Last In, First Out (LIFO) principle. Elements are added (pushed) and removed (popped) from the top of the stack. It is often used for function calls, undo mechanisms, and balancing symbols.

Answered by: Zoha Tazmen

Your Answer