What do you mean by stack explain the push or pop operation?

1 answer

Answer

1147776

2026-07-14 10:10

+ Follow

A stack is a linear data structure that follows the Last In, First Out (LIFO) principle, meaning the last element added is the first one to be removed. The "push" operation adds an element to the top of the stack, while the "pop" operation removes the element from the top. Both operations are typically performed in constant time, O(1), making stacks efficient for various applications, such as function call management and expression evaluation in programming.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.