Why we say that stack behaves like LIFO?Because the structure of stack is based on first in last out. The value which we push last on the stack should be pop first.
No comments: