Skip to content

Commit 943eac7

Browse files
committed
Create README - LeetHub
1 parent 16bf8d2 commit 943eac7

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

445-add-two-numbers-ii/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<h2><a href="https://leetcode.com/problems/add-two-numbers-ii/">445. Add Two Numbers II</a></h2><h3>Medium</h3><hr><div><p>You are given two <strong>non-empty</strong> linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.</p>
2+
3+
<p>You may assume the two numbers do not contain any leading zero, except the number 0 itself.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong>Example 1:</strong></p>
7+
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/09/sumii-linked-list.jpg" style="width: 523px; height: 342px;">
8+
<pre><strong>Input:</strong> l1 = [7,2,4,3], l2 = [5,6,4]
9+
<strong>Output:</strong> [7,8,0,7]
10+
</pre>
11+
12+
<p><strong>Example 2:</strong></p>
13+
14+
<pre><strong>Input:</strong> l1 = [2,4,3], l2 = [5,6,4]
15+
<strong>Output:</strong> [8,0,7]
16+
</pre>
17+
18+
<p><strong>Example 3:</strong></p>
19+
20+
<pre><strong>Input:</strong> l1 = [0], l2 = [0]
21+
<strong>Output:</strong> [0]
22+
</pre>
23+
24+
<p>&nbsp;</p>
25+
<p><strong>Constraints:</strong></p>
26+
27+
<ul>
28+
<li>The number of nodes in each linked list is in the range <code>[1, 100]</code>.</li>
29+
<li><code>0 &lt;= Node.val &lt;= 9</code></li>
30+
<li>It is guaranteed that the list represents a number that does not have leading zeros.</li>
31+
</ul>
32+
33+
<p>&nbsp;</p>
34+
<p><strong>Follow up:</strong>&nbsp;Could you solve it without reversing the input lists?</p>
35+
</div>

0 commit comments

Comments
 (0)