Sample Question

easy
1. You are give two single linkedlist of digits. 
2. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
3. You may assume the two numbers do not contain any leading zero, except the number 0 itself.

Input Format

1->2->3->4->5->6->7->null 7->8->9->null

Output Format

1->2->3->5->3->5->6->null

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
8
8 2 2 8 2 4 2 1 
9
4 1 7 7 7 4 2 2 4 
Output
5 0 0 0 5 6 6 4 5 
Previous
Intersection Node In Two Linkedlist Using Floyd Cycle Method
Next
Range Addition

Related Questions