Advertisements
Advertisements
Question
Write an algorithm to implement pop operation.
Very Short Answer
Advertisements
Solution
- Start.
- If
top = -1, printStack Emptyand stop. - Store
stack[top]as the deleted item. - Decrement
topby 1. - Print
Item Deleted. - Stop.
shaalaa.com
Is there an error in this question or solution?
