mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<p>Given an array of string <code>words</code>. Return all strings in <code>words</code> which is substring of another word in <strong>any</strong> order. </p>
|
||||
<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>
|
||||
|
||||
<p>String <code>words[i]</code> is substring of <code>words[j]</code>, if can be obtained removing some characters to left and/or right side of <code>words[j]</code>.</p>
|
||||
<p>A <strong>substring</strong> is a contiguous sequence of characters within a string</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> words = ["mass","as","hero","superhero"]
|
||||
@@ -12,7 +12,7 @@
|
||||
["hero","as"] is also a valid answer.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> words = ["leetcode","et","code"]
|
||||
@@ -20,11 +20,12 @@
|
||||
<strong>Explanation:</strong> "et", "code" are substring of "leetcode".
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> words = ["blue","green","bu"]
|
||||
<strong>Output:</strong> []
|
||||
<strong>Explanation:</strong> No string of words is substring of another string.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
@@ -34,5 +35,5 @@
|
||||
<li><code>1 <= words.length <= 100</code></li>
|
||||
<li><code>1 <= words[i].length <= 30</code></li>
|
||||
<li><code>words[i]</code> contains only lowercase English letters.</li>
|
||||
<li>It's <strong>guaranteed</strong> that <code>words[i]</code> will be unique.</li>
|
||||
<li>All the strings of <code>words</code> are <strong>unique</strong>.</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user