Skip to content

Stack: Push

Task: Push three values onto the stack

ABCtopTOP OF THE STACKCpushed last

What you are watching

Pushing adds a value at the top of the stack, and the top is the only place anything can be added. A, then B, then C: each one lands on the one before it, and each one becomes the value the stack will hand back first. A is still there the whole time and has been unreachable since B arrived, which is the rule the other three operations inherit.