Skip to Content
Learn
Stacks: Conceptual
Stacks Implementation

Stacks can be implemented using a linked list as the underlying data structure because it’s more efficient than a list or array.

Depending on the implementation, the top of the stack is equivalent to the head node of a linked list and the bottom of the stack is equivalent to the tail node.

A constraint that may be placed on a stack is its size. This is done to limit and quantify the resources the data structure will take up when it is “full”.

Attempting to push data onto an already full stack will result in a stack overflow. Similarly, if you attempt to pop data from an empty stack, it will result in a stack underflow.

Instructions

Why would a Stack be implemented using a Linked List rather than an Array or List?

What could the benefits be for this implementation?

Folder Icon

Sign up to start coding

Already have an account?