All Patterns

Linked List

Manipulate node-based data structures using pointer techniques like fast/slow, dummy heads, and in-place reversal.

When to use

  • Node insertion/deletion
  • Cycle detection
  • Merging sorted sequences
  • Reversing sequences

When NOT to use

  • Need random access by index
  • Need cache-friendly iteration

Common traps

  • Losing reference to nodes
  • Not using dummy head for edge cases
  • Infinite loops in cycle problems

Key Invariant

Pointer manipulation is the core skill — draw the before/after state before coding

Problems (12)

#16Merge Two Sorted Lists
easyFREE
#18Reverse Linked List
easyFREE
#43Linked List Cycle
easyFREE
#44Middle of the Linked List
easyFREE
#45Remove Nth Node From End of List
easyFREE
#214Palindrome Linked List
easy
#26Add Two Numbers
mediumFREE
#194LRU Cache
medium
#211Swap Nodes in Pairs
medium
#212Reorder List
medium
#213Sort List
medium
#215Copy List with Random Pointer
medium