Concept Flow - Pop Operation on Stack
Check if stack is empty?
No
Remove top element
Update top pointer
Return removed element
Done
Yes
Stack Underflow - cannot pop
Done
The pop operation first checks if the stack is empty. If not, it removes the top element, updates the top pointer, and returns the removed element. If empty, it signals underflow.