In this article, we will learn how to Merge two sorted linked list such that the final linked list is also sorted in linear time O(N).
Table of contents:
Problem Statement: Merge two sorted linked listsAlgorithmImplementation (Step by Step)
Let us get started with Merge two sorted linked lists.
Problem Statement: Merge two sorted linked lists
Merge two given sorted linked list and return head of new linked list which should also be sorted.
Example :
Input: linked list 1 = {1,2,4} , linked l...
Published on October 20, 2021 00:24