1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 11:21:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part2

This commit is contained in:
2022-03-27 20:38:29 +08:00
parent 5a4fa6db12
commit 0fc7f4b734
1617 changed files with 134637 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<p>Given a string band an array of smaller strings T, design a method to search b for each small string in T. Output&nbsp;<code>positions</code> of all strings in&nbsp;<code>smalls</code>&nbsp;that appear in <code>big</code>,&nbsp;where <code>positions[i]</code> is all positions of <code>smalls[i]</code>.</p>
<p><strong>Example: </strong></p>
<pre>
<strong>Input: </strong>
big = &quot;mississippi&quot;
smalls = [&quot;is&quot;,&quot;ppi&quot;,&quot;hi&quot;,&quot;sis&quot;,&quot;i&quot;,&quot;ssippi&quot;]
<strong>Output: </strong> [[1,4],[8],[],[3],[1,4,7,10],[5]]
</pre>
<p><strong>Note: </strong></p>
<ul>
<li><code>0 &lt;= len(big) &lt;= 1000</code></li>
<li><code>0 &lt;= len(smalls[i]) &lt;= 1000</code></li>
<li>The total number of characters in&nbsp;<code>smalls</code>&nbsp;will not exceed 100000.</li>
<li>No duplicated strings in&nbsp;<code>smalls</code>.</li>
<li>All characters are lowercase letters.</li>
</ul>