1.

Write an algorithm to implement pop operation.

Answer»

1. Start

2. If the value of top is -1 go to step 3 else go to step 4

3. Print “Stack Empty” and go to step 7

4. Deleted item = Stack[top]

5. Decrement top by 1

6. print “Item Deleted”

7. Stop



Discussion

No Comment Found