LeetEye LeetEye
Pattern

Linked List

Navigate node-based data structures with pointer manipulation.

8 Problems
0 Easy
8 Medium
0 Hard

How Linked List Works

Linked List pattern visualization

Linked List problems typically use pointer manipulation techniques. The two most important patterns are the fast/slow pointer (tortoise and hare) for cycle detection and finding midpoints, and dummy head nodes for simplifying insertions/deletions. The fast pointer moves two steps while the slow moves one — when fast reaches the end, slow is at the middle. For cycle detection, if they ever meet, a cycle exists. Reversing a linked list uses three pointers: prev, curr, and next.

When to Use Linked List

Pattern Recognition

Look for these trigger words in problem statements:

reverse linked list linked-list merge two sorted lists linked list cycle reorder list remove nth node from end of list copy list with random pointer merge k sorted lists reverse nodes in k-group

Common Mistakes

  • Losing reference to nodes by overwriting pointers without saving them first
  • Forgetting the edge case of empty lists or single-node lists
  • Not using a dummy head node, leading to complex special-case handling for the head
  • Infinite loops from incorrect pointer updates during reversal or reordering

When NOT to Use Linked List

  • When you need random access by index (use an array)
  • When the problem is about subsequences or subarrays (use sliding window or DP)
  • When the overhead of pointer manipulation outweighs the benefit

Practice Problems

Master Linked List

Build pattern recognition with interactive MCQs. Understand why to use Linked List, not just how.

Download LeetEye Free
Practice in LeetEye