DSA Master › Topic 7

Linked Lists

Linked list problems are mostly careful pointer bookkeeping. Three tools cover nearly all of them: a dummy head node so edge cases go away, slow/fast pointers for the middle or a cycle, and in-place reversal.

Concepts

How to recognise it

Common pitfalls

Problems

  1. Reverse Linked List (Easy)
  2. Linked List Cycle (Easy)
  3. Linked List Cycle II (Medium)
  4. Middle of the Linked List (Easy)
  5. Merge Two Sorted Lists (Easy)
  6. Remove Nth Node From End of List (Medium)
  7. Add Two Numbers (Medium)
  8. Reorder List (Medium)
  9. Reverse Nodes in k-Group (Hard)