LeetCode 1669 Merge In Between Linked Lists (Medium Complexity Problem)

preview_player
Показать описание
LeetCode 1669 Merge In Between Linked Lists (Medium Complexity Problem)

Fast Java Solution , Just Using Pointers

Time Complexity O(N)
Space Complexity O(1)

If you find this video helpful, please 'Like' & 'Subscribe'.
This is really helpful for the channel and also motivates me to do more of such good videos.

Problem Description:

You are given two linked lists: list1 and list2 of sizes n and m respectively.

Remove list1's nodes from the ath node to the bth node, and put list2 in their place.

The blue edges and nodes in the following figure indicate the result:

Build the result list and return its head.

#coding #softwareengineer #Leetcode #Algorithm #DataStructure #Java #programmer #tech #software #codinglife #Preparation
#interview #programminglife #programmingisfun #leetcode #leetcode1669
Рекомендации по теме
join shbcf.ru