Skip to content

Commit 4de4980

Browse files
committed
Added README.md file for Add Strings
1 parent 1f0b821 commit 4de4980

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

415-add-strings/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<h2><a href="https://leetcode.com/problems/add-strings">Add Strings</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p>Given two non-negative integers, <code>num1</code> and <code>num2</code> represented as string, return <em>the sum of</em> <code>num1</code> <em>and</em> <code>num2</code> <em>as a string</em>.</p>
2+
3+
<p>You must solve the problem without using any built-in library for handling large integers (such as <code>BigInteger</code>). You must also not convert the inputs to integers directly.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> num1 = &quot;11&quot;, num2 = &quot;123&quot;
10+
<strong>Output:</strong> &quot;134&quot;
11+
</pre>
12+
13+
<p><strong class="example">Example 2:</strong></p>
14+
15+
<pre>
16+
<strong>Input:</strong> num1 = &quot;456&quot;, num2 = &quot;77&quot;
17+
<strong>Output:</strong> &quot;533&quot;
18+
</pre>
19+
20+
<p><strong class="example">Example 3:</strong></p>
21+
22+
<pre>
23+
<strong>Input:</strong> num1 = &quot;0&quot;, num2 = &quot;0&quot;
24+
<strong>Output:</strong> &quot;0&quot;
25+
</pre>
26+
27+
<p>&nbsp;</p>
28+
<p><strong>Constraints:</strong></p>
29+
30+
<ul>
31+
<li><code>1 &lt;= num1.length, num2.length &lt;= 10<sup>4</sup></code></li>
32+
<li><code>num1</code> and <code>num2</code> consist of only digits.</li>
33+
<li><code>num1</code> and <code>num2</code> don&#39;t have any leading zeros except for the zero itself.</li>
34+
</ul>

0 commit comments

Comments
 (0)