The stack is currently empty.
A stack is a linear data structure that follows the Last In First Out (LIFO) principle. Elements are added and removed from the top of the stack.
Time Complexity
Push: O(1), Pop: O(1)
Space Complexity
O(n)
1.procedure push(stack, value) 2. top = top + 1 3. stack[top] = value 4.end procedure 5. 6.procedure pop(stack) 7. if stack is empty then 8. return "Stack Underflow" 9. value = stack[top]10. top = top - 111. return value12.end procedure