Merge In between linked list Python

Leetcode 1669: Merge In Between Linked Lists

Pierre-Marie Poitevin

Dec 3, 2020·2 min read

In this Leetcode problem, we want to merge a list list2 into another list list1 and remove some elements of list1 where list2 is going.

Problem statement

Solution

We want to simply build the list simply by going to the node in list1 where list2 should be inserted. Then keep going in list1 to get to the node that should come after the last node of list2.

Video liên quan

Chủ Đề