Intersection of Two Linked Lists
Asked in the Phone Screen 1 stage. LeetCode problem linked by the candidate.
The function receives two lists of node identifiers, headA and headB. Each list represents a linked-list path. Identical identifiers represent the same node, and an intersection means both lists share the same suffix from that node onward. Return the identifier of the first shared node, or None if the lists do not intersect.
def get_intersection_node(headA, headB):