WorkspaceLearning path
Level 2 · Core Data Structures
BUILD YOUR INTUITION

Linked List

Follow identity-based links between nodes; position is reached by traversal rather than indexing.

THE MENTAL MODEL

When should this come to mind?

Follow identity-based links between nodes; position is reached by traversal rather than indexing.

Change next pointersReverse or splice nodesConstant-space traversal

What makes it work

Saving a node's successor before rewriting a link prevents losing the remaining list.

When to choose something else

Frequent indexed lookups favor arrays.

See the pattern in action

Change the input. Follow the state. Make it yours.