easyLinked ListLinked List

Middle of the Linked List

easyTime: O(n)Space: O(1)

Signals to notice

find middle nodesingle passno length known

Brute force first

Count length, then traverse to length/2 — two passes. That instinct is useful because it follows the prompt literally, but it usually keeps revisiting work the problem is begging you to organize.

The key insight

Slow moves 1, fast moves 2 — when fast reaches end, slow is at middle — single pass. The goal is not to be clever for its own sake, but to remember the one relationship that keeps the solution grounded as you move forward.

What must stay true

Fast moves twice as fast, so when it finishes, slow has covered exactly half. If that remains true after every update, the rest of the reasoning has a stable place to stand.

Easy way to go wrong

Off-by-one for even-length lists — decide if you want the first or second middle node. Most mistakes here are not about syntax; they come from losing track of what your state, pointer, or structure is supposed to mean.

Linked List Pattern