← 返回 linkedin 的题目列表Find Intersection of Two Linked Lists
类型:online_judge
Given two singly linked lists, if they intersect, return the intersection node. The algorithm must be completed in O(N) time and use O(1) space. Implement the function get_intersection_node(head_a: ListNode, head_b: ListNode) -> Optional[ListNode]. Assume both lists end with null.
Example
Input
See leetcode test format for inputs