Linked List Intersection
Given two sorted linked lists l0
, and l1
, return a new sorted linked list containing the intersection of the two lists.
Constraints
n ≤ 100,000
wheren
is the number of nodes inl0
m ≤ 100,000
wherem
is the number of nodes inl1
https://binarysearch.com/problems/Linked-List-Intersection
Examples
Example 1
Input
- l0 =
- l1 =
Output
- answer =
Example 2
Input
- l0 =
- l1 =
Output
- answer =
Leave a comment