Addition Of Two Linkedlist

easy
1. Given are heads of two linklist each representing two numbers, task is to add the given linklists. 
2. Function will accept parameters representing two numbers(as a linklist , one digit in each node) & is expected to return head of resultant linked list.

Input Format

LinkList1 : 6 -> 2 -> 3 -> 4 -> 5 LinkList2 : 6 -> 4 -> 1 -> 5 -> 7

Output Format

Added LinkList : 1 -> 2 -> 6 -> 5 -> 0 -> 2

Constraints

0 <= N <= 10^6

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input

        
Output

        
Previous
Remove Duplicates From Sorted Linkedlist
Next
Rain Dance

Related Questions