Stack

LIFO (Last In, First Out) data structure — visualize Push, Pop, Peek operations

Add operations and click Visualize to start

Add Operation

Operations Queue

push(10)
push(20)
push(30)
peek()
pop()
push(5)
pop()
Step 0of 0
Speed×5
SlowFast

Stack Operations

PushO(1)
PopO(1)
PeekO(1)
SpaceO(n)