Data Structures19 sections · 729 units
Open in Course

Section Recap

What you learned

You now understand linked list fundamentals: Core Techniques:

  • Traversal with null checks
  • Dummy head for cleaner code
  • Three-pointer reversal
  • Fast-slow pointer for middle and cycles

Patterns:

  • Reversal: iterative with prev/current/next
  • Cycle detection: fast catches slow inside cycle
  • Merge: compare heads, append smaller
  • LRU: hash map + doubly linked list

Complexity:

  • Traversal: O(n)O(n) time, O(1)O(1) space
  • Reversal: O(n)O(n) time, O(1)O(1) space iterative
  • LRU operations: O(1)O(1) time

These pointer manipulation skills transfer directly to trees and graphs. Every tree traversal is linked list traversal with two next pointers instead of one.