Simple addition with carry
Input
[2,4,3] + [5,6,4]
Output
[7,0,8]
342 + 465 = 807; reversed representation is [7,0,8].
Full lesson preview
Add two non-negative integers represented by linked lists where each node stores a single digit in reverse order.
Problem statement
Task
Examples
Input
[2,4,3] + [5,6,4]
Output
[7,0,8]
342 + 465 = 807; reversed representation is [7,0,8].
Input format
Output format
Constraints
Samples
Input
[0] + [0]
Output
[0]
0 + 0 = 0