Data Structure

Stack (LIFO)

Step

Ready

Time Complexity

O(1)

Space Complexity

O(n)

Size

0

Stack is empty

Stack Operations

Choose an operation and execute it to see how the stack behaves. Push adds elements to the top, Pop removes from the top, and Peek shows the top element.