Merge two unsorted linked lists to get a sorted list - Set 2
Given two unsorted Linked Lists, L1 of N nodes and L2 of M nodes, the task is to merge them to get a sorted singly linked list. Examples: Input: L1 = 3?5?1, L2 = 6?2?4?9Output: 1?2?3?4?5?6?9 Input: L1 = 1?5?2, L2 = 3?7Output: 1?2?3?5?7 Note: A Memory Efficient approach that solves this problem in O(