Merge Two Sorted Linked Lists
Merge Two Sorted Linked Lists
Problem Statement
Given two sorted linked lists, the task is to merge them into one sorted linked list. The merged linked list should be created by splicing together the nodes of the input lists.
Example
Input:
list1 = [1, 2, 4]list2 = [1, 3, 4]
Output:
Merged List: 1 -> 1 -> 2 -> 3 -> 4 -> 4