Merge two sorted linked lists and return it as a new linked list
Algorithm :
1- Declare 3 pointers
a- 1st pointer to 1st list's head
b- 2nd pointer to 2nd list's head
c- 3rd pointer to 3rd list's head
2- Compare 1st list data with second list data
3- update list pointer accordingly by moving pointer to next node
4- push data to result list and update list pointer to its next pointer.
Leet Code Problem Link : https://leetcode.com/problems/merge-t...
Source Code : https://github.com/webtechschool/Data...
Company Tag : Amazon, Microsoft, Snapdeal, Adobe (Courtesy : geekforgeeks)