Detect intersection of two linked lists | LinkedIn
|Home/Coding & Algorithms/LinkedIn
Detect intersection of two linked lists
LinkedIn
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
0
0
Given two singly linked lists that may converge to share a common tail, determine whether they intersect and return the first node at which they join. Nodes are compared by reference, not by value. Aim for O(m+n) time and O(
extra space. Describe and implement an approach, justify its correctness, and analyze time and space complexity. Discuss edge cases such as one empty list, no intersection, and very unequal lengths.