Interleaved Linked List
Given two linked lists l0 and l1, return the two linked lists interleaved, starting with l0. If there are leftover nodes in a linked list, they should be added to the end.
Constraints
n ≤ 100,000wherenis the number of nodes inl0m ≤ 100,000wheremis the number of nodes inl1
https://binarysearch.com/problems/Interleaved-Linked-List
Examples
Example 1
Input
- l0 =
- l1 =
Output
- answer =
Example 2
Input
- l0 =
- l1 =
Output
- answer =
Leave a comment