Skip to content

Commit 49f81a9

Browse files
committed
Create README - LeetHub
1 parent 7c1f9e5 commit 49f81a9

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<h2><a href="https://leetcode.com/problems/add-two-numbers/">2. Add Two Numbers</a></h2><h3>Medium</h3><hr>Add Two Numbers - 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+
7+
Example 1:
8+
9+
[https://assets.leetcode.com/uploads/2020/10/02/addtwonumber1.jpg]
10+
11+
12+
Input: l1 = [2,4,3], l2 = [5,6,4]
13+
Output: [7,0,8]
14+
Explanation: 342 + 465 = 807.
15+
16+
17+
Example 2:
18+
19+
20+
Input: l1 = [0], l2 = [0]
21+
Output: [0]
22+
23+
24+
Example 3:
25+
26+
27+
Input: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
28+
Output: [8,9,9,9,0,0,0,1]
29+
30+
31+
 
32+
33+
Constraints:
34+
35+
* The number of nodes in each linked list is in the range [1, 100].
36+
* 0 <= Node.val <= 9
37+
* It is guaranteed that the list represents a number that does not have leading zeros.

0 commit comments

Comments
 (0)