Skip to content

Commit 7a7ddce

Browse files
Create README - LeetHub
1 parent ad9df2a commit 7a7ddce

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Diff for: 0093-restore-ip-addresses/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<h2><a href="https://leetcode.com/problems/restore-ip-addresses/">93. Restore IP Addresses</a></h2><h3>Medium</h3><hr><div><p>A <strong>valid IP address</strong> consists of exactly four integers separated by single dots. Each integer is between <code>0</code> and <code>255</code> (<strong>inclusive</strong>) and cannot have leading zeros.</p>
2+
3+
<ul>
4+
<li>For example, <code>"0.1.2.201"</code> and <code>"192.168.1.1"</code> are <strong>valid</strong> IP addresses, but <code>"0.011.255.245"</code>, <code>"192.168.1.312"</code> and <code>"[email protected]"</code> are <strong>invalid</strong> IP addresses.</li>
5+
</ul>
6+
7+
<p>Given a string <code>s</code> containing only digits, return <em>all possible valid IP addresses that can be formed by inserting dots into </em><code>s</code>. You are <strong>not</strong> allowed to reorder or remove any digits in <code>s</code>. You may return the valid IP addresses in <strong>any</strong> order.</p>
8+
9+
<p>&nbsp;</p>
10+
<p><strong class="example">Example 1:</strong></p>
11+
12+
<pre><strong>Input:</strong> s = "25525511135"
13+
<strong>Output:</strong> ["255.255.11.135","255.255.111.35"]
14+
</pre>
15+
16+
<p><strong class="example">Example 2:</strong></p>
17+
18+
<pre><strong>Input:</strong> s = "0000"
19+
<strong>Output:</strong> ["0.0.0.0"]
20+
</pre>
21+
22+
<p><strong class="example">Example 3:</strong></p>
23+
24+
<pre><strong>Input:</strong> s = "101023"
25+
<strong>Output:</strong> ["1.0.10.23","1.0.102.3","10.1.0.23","10.10.2.3","101.0.2.3"]
26+
</pre>
27+
28+
<p>&nbsp;</p>
29+
<p><strong>Constraints:</strong></p>
30+
31+
<ul>
32+
<li><code>1 &lt;= s.length &lt;= 20</code></li>
33+
<li><code>s</code> consists of digits only.</li>
34+
</ul>
35+
</div>

0 commit comments

Comments
 (0)