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

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -1,42 +1,42 @@
<p>字符串 <code>s</code> 看作是&nbsp;<code>abcdefghijklmnopqrstuvwxyz</code>&nbsp;无限环绕字符串,所以&nbsp;<code>s</code> 看起来是这样的:</p>
<p>定义字符串&nbsp;<code>base</code>&nbsp;为一个&nbsp;<code>"abcdefghijklmnopqrstuvwxyz"</code>&nbsp;无限环绕字符串,所以&nbsp;<code>base</code>&nbsp;看起来是这样的:</p>
<ul>
<li><code>"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd...."</code>&nbsp;.&nbsp;</li>
<li><code>"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd...."</code>.</li>
</ul>
<p>现在给定另一个字符串 <code>p</code> 。返回<em>&nbsp;<code>s</code>&nbsp;<strong>唯一</strong><code>p</code><strong>非空子串</strong>&nbsp;的数量&nbsp;</em>&nbsp;</p>
<p>给你一个字符串&nbsp;<code>s</code> ,请你统计并返回&nbsp;<code>s</code>&nbsp;中有多少&nbsp;<strong>不同</strong><strong>非空子串</strong>&nbsp;也在&nbsp;<code>base</code>&nbsp;中出现。</p>
<p>&nbsp;</p>
<p><strong>示例&nbsp;1:</strong></p>
<p><strong>示例&nbsp;1</strong></p>
<pre>
<strong>输入:</strong> p = "a"
<strong>输出:</strong> 1
<strong>解释:</strong> 字符串 s 中只有一个"a"子字符
<strong>输入</strong>s = "a"
<strong>输出</strong>1
<strong>解释</strong>字符串 s 的子字符串 "a" 在 base 中出现
</pre>
<p><strong>示例 2:</strong></p>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong> p = "cac"
<strong>输出:</strong> 2
<strong>解释:</strong> 字符串 s 中的字符串“cac”只有两个子串“a”、“c”。.
<strong>输入</strong>s = "cac"
<strong>输出</strong>2
<strong>解释</strong>字符串 s 有两个子字符串 ("a", "c") 在 base 中出现。
</pre>
<p><strong>示例 3:</strong></p>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong> p = "zab"
<strong>输出:</strong> 6
<strong>解释:</strong>字符串 s 有六个子串“z”、“a”、“b”、“za”、“ab”、“zab”
<strong>输入</strong>s = "zab"
<strong>输出</strong>6
<strong>解释</strong>字符串 s 有六个子字符串 ("z", "a", "b", "za", "ab", and "zab") 在 base 中出现
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<p><strong>提示</strong></p>
<ul>
<li><code>1 &lt;= p.length &lt;= 10<sup>5</sup></code></li>
<li><code>p</code>&nbsp;由小写英文字母</li>
<li><code>1 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
<li><font color="#c7254e" face="Menlo, Monaco, Consolas, Courier New, monospace"><span style="font-size: 12.6px; background-color: rgb(249, 242, 244);">s</span></font> 由小写英文字母</li>
</ul>