What is the basic elementary operation for a stack
Answers
Answered by
0
Answer:
There are three basic elementary operations for a stack.
- Push – It adds an item in the stack. If the stack is full then, it is said to be an overflow condition.
- Pop – It removes an item for the stack. The items are popped in the reversed order in which they are pushed. If the stack is empty, then it is said to be an underflow condition.
- Peek or Top – It returns top element of stack.
Explanation:
- I hope it will be helpful to you.
Similar questions