Write an algorithm of Deletion(Pop) using array in Stack

Algorithm:

Push(Stack,N,Top)
(1) [Start]
(2) [Check for Empty]
If Top= -1
Show “Stack is Empty”
Return
Else
Delete Stack[Top]
Top= Top-1
[End Of If Else step 2]
(3)  [Return]

Leave a Reply

Your email address will not be published. Required fields are marked *