Category: Data Structures | Time: O(1) | Space: O(n)
Visualization
Visual representation of the data structure
Enter commands to start stack visualization.
About Stack
A linear data structure that follows the Last-In, First-Out (LIFO) principle. Elements are added (pushed) and removed (popped) from the same end, called the 'top'.
Code Editor
The code is for reference. Editing it won't affect the visualization.