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 is empty first. If not, it accesses and returns the top element without removing it.
