You are given two non-empty linked lists representing two non-negative integers.
· Each node contains a single digit.
· The digits are stored in reverse order.
Add the two numbers and return the total as a linked list in reverse order.
You can assume both numbers have no leading zeros, except when the number itself is 0.
Input: l1 = [4,3,2], l2 = [7,6,5]
Output: [1,0,8]
Explanation:
The numbers are 234 and 567. 234 + 567 = 801, stored in reverse as [1,0,8].
Input: l1 = [9,9], l2 = [1]
Output: [0,0,1]
Explanation:
99 + 1 = 100, reverse is [0,0,1].
Input: l1 = [5,5,5,5], l2 = [5,5,5]
Output: [0,1,1,6]
Explanation:
555 + 555 = 6110, reverse is [0,1,1,6].
Accepted:
Submission: