Skip to main content

Linked List

What a linked list means, when pointers matter more than indexes, and why this structure shows up so often in interviews.

Andrews Ribeiro

Andrews Ribeiro

Founder & Engineer

What it is

A linked list is a structure made of nodes.

Each node stores a value and a reference to the next node.

Unlike an array, the focus here is not indexing.

The focus is who points to whom.

When to use it

It appears when the problem talks about:

  • reversing pointers
  • detecting cycles
  • stitching sorted lists together
  • inserting or removing nodes without shifting a whole array

Common mistake

The classic mistake is treating a linked list like a worse array.

That leads you in the wrong direction because these problems usually do not care about random access.

They care about pointer reasoning, link order, and structure.

Better question

Before using it, ask:

  1. is the problem centered on next, head, tail, or cycle?
  2. do I need to change links between nodes instead of moving values around?
  3. am I trying to solve a pointer problem as if it were an array problem?

Keep exploring