Algorithms

Linked list

A list where each element, called a node, stores its value and where the next one is. Nodes can be anywhere in memory, joined like links in a chain.

Example

Adding a node at the start is 1 step: the new one points to the old first. But to reach element 500 you have to pass the 499 before it.

Test yourself: Linked list

Linked lists

What does each node of a linked list store?

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.