Concept Flow - Peek Top Element of Stack
Start
Check if stack is empty?
Yes→Return 'Stack is empty'
No
Access top element
Return top element
End
The flow checks if the stack has elements. If empty, it returns a message. Otherwise, it accesses and returns the top element without removing it.
