Linked List problems, grouped by pattern

Linked list problems are about pointer discipline. A dummy node removes head edge cases, slow and fast pointers find middles and cycles, and careful reversal handles everything from palindromes to k-group swaps.

When to reach for it

  • The head itself might change
  • You need the middle, the nth-from-end node or a cycle
  • The list must be reversed in place, fully or in parts

Mistakes to watch for

  • Losing the next pointer before rewiring
  • Returning head instead of dummy.next
  • Fast pointer null checks in the wrong order

The 20 problems

1Dummy Node Pattern

2Slow Fast Pointers

3Front Back Pointer

4Front Middle Back Pointer

5Miscellaneous