Company: SDET_12oct
Difficulty: medium
Merge Sorted Lists Problem Description You are given two sorted linked lists. Your task is to merge these two sorted linked lists into a single sorted linked list. Take a function merge_sorted_lists that takes two linked lists and returns a new linked list that contains all the elements from the two input lists, sorted in non-decreasing order. Input Format The first line contains an integer n1 , which is the number of elements in the first set. The next n1 lines contain the elements of the first set. The line after the last element of the first set contains an integer n2 , which is the number of elements in the second set. The following n2 lines contain the elements of the second set. Output Format Return a single linked list represented by a Python list, containing all the integers from both input lists, sorted in non-decreasing order. Constraints Each linked list contains at most 10 5 elements. The elements in the linked lists are integers and are within the range of -10 9 to 10 9 .