Overview - Intersection Point of Two Linked Lists
What is it?
Given two singly linked lists that may share a common tail, find the node where they first merge. Intersection means the same object reference — both pointers hold the exact same ListNode instance in memory. In TypeScript, object reference equality is checked with === which compares references (memory addresses), not the values of the properties.
Why it matters
TypeScript inherits JavaScript's reference semantics for objects — understanding when === means value equality (primitives) vs reference equality (objects) is essential for correct data structure manipulation. The two-pointer path-swap technique demonstrates O(1) space intersection detection without any extra data structures.
Where it fits
You need comfort with TypeScript class references, linked list traversal, and === semantics for objects before tackling this. After mastering it, Floyd's cycle detection, merging sorted lists, and WeakMap-based caching follow naturally.
