Skip to content

Commit f1bb40f

Browse files
committed
Adding readme file
1 parent 723afc3 commit f1bb40f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

2-AddTwoNumbers/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.
2+
3+
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
4+
5+
 
6+
Example 1:
7+
8+
Input: l1 = [2,4,3], l2 = [5,6,4]
9+
Output: [7,0,8]
10+
Explanation: 342 + 465 = 807.
11+
12+
13+
Example 2:
14+
15+
Input: l1 = [0], l2 = [0]
16+
Output: [0]
17+
18+
19+
Example 3:
20+
21+
Input: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
22+
Output: [8,9,9,9,0,0,0,1]
23+
24+
25+
 
26+
Constraints:
27+
28+
29+
The number of nodes in each linked list is in the range [1, 100].
30+
0 <= Node.val <= 9
31+
It is guaranteed that the list represents a number that does not have leading zeros.
32+

0 commit comments

Comments
 (0)