# Learn Stacks

Learn about the first-in-last-out data structure called a "stack". Study it conceptually and use it in practice. Apply what you've learned to the famous Towers of Hanoi problem!

Start## Key Concepts

Review core concepts you need to learn to master this subject

The *stack* data structure

The *stack* data structure

A *stack* is a data structure that follows a last in, first out (LIFO) protocol. The latest node added to a stack is the node which is eligible to be removed first. If three nodes (`a`

, `b`

and, `c`

) are added to a stack in this exact same order, the node `c`

must be removed first. The only way to remove or return the value of the node `a`

is by removing the nodes `c`

and `b`

.

Stacks: Conceptual

Lesson 1 of 2

- 1A stack is a data structure which contains an ordered set of data. Stacks provide three methods for interaction: - Push - adds data to the “top” of the stack - Pop - returns and removes data from…
- 2Stacks 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 equivalen…
- 3Let’s take a minute to review what we’ve covered about stacks in this lesson. Stacks: - Contain data nodes - Support three main operations - Push adds data to the top of the stack - Pop remov…

## What you'll create

Portfolio projects that showcase your new skills

## How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory