8000 Create README - LeetHub · tkhwang/tkhwang-algorithm@0813948 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0813948

Browse files
committed
Create README - LeetHub
1 parent 59775d2 commit 0813948

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
C7DF
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<h2><a href="https://leetcode.com/problems/string-matching-in-an-array">1524. String Matching in an Array</a></h2><h3>Easy</h3><hr><p>Given an array of string <code>words</code>, return <em>all strings in </em><code>words</code><em> that is a <strong>substring</strong> of another word</em>. You can return the answer in <strong>any order</strong>.</p>
2+
3+
<p>A <strong>substring</strong> is a contiguous sequence of characters within a string</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> words = [&quot;mass&quot;,&quot;as&quot;,&quot;hero&quot;,&quot;superhero&quot;]
10+
<strong>Output:</strong> [&quot;as&quot;,&quot;hero&quot;]
11+
<strong>Explanation:</strong> &quot;as&quot; is substring of &quot;mass&quot; and &quot;hero&quot; is substring of &quot;superhero&quot;.
12+
[&quot;hero&quot;,&quot;as&quot;] is also a valid answer.
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<pre>
18+
<strong>Input:</strong> words = [&quot;leetcode&quot;,&quot;et&quot;,&quot;code&quot;]
19+
<strong>Output:</strong> [&quot;et&quot;,&quot;code&quot;]
20+
<strong>Explanation:</strong> &quot;et&quot;, &quot;code&quot; are substring of &quot;leetcode&quot;.
21+
</pre>
22+
23+
<p><strong class="example">Example 3:</strong></p>
24+
25+
<pre>
26+
<strong>Input:</strong> words = [&quot;blue&quot;,&quot;green&quot;,&quot;bu&quot;]
27+
<strong>Output:</strong> []
28+
<strong>Explanation:</strong> No string of words is substring of another string.
29+
</pre>
30+
31+
<p>&nbsp;</p>
32+
<p><strong>Constraints:</strong></p>
33+
34+
<ul>
35+
<li><code>1 &lt;= words.length &lt;= 100</code></li>
36+
<li><code>1 &lt;= words[i].length &lt;= 30</code></li>
37+
<li><code>words[i]</code> contains only lowercase English letters.</li>
38+
<li>All the strings of <code>words</code> are <strong>unique</strong>.</li>
39+
</ul>

0 commit comments

Comments
 (0)
0