Stack

Stack
First -In-Last -Out
or
Last-In-First-Out
Working of stack


Initially point the top to -1
Push: increment the top and then add the value
Pop: Take out the value and then decrement the top.