1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/重复的DNA序列 [repeated-dna-sequences].html
2022-03-29 12:43:11 +08:00

35 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p><strong>DNA序列</strong>&nbsp;由一系列核苷酸组成,缩写为<meta charset="UTF-8" />&nbsp;<code>'A'</code>,&nbsp;<code>'C'</code>,&nbsp;<code>'G'</code>&nbsp;<meta charset="UTF-8" />&nbsp;<code>'T'</code>.。</p>
<ul>
<li>例如,<meta charset="UTF-8" /><code>"ACGAATTCCG"</code>&nbsp;是一个 <strong>DNA序列</strong></li>
</ul>
<p>在研究 <strong>DNA</strong> 时,识别 DNA 中的重复序列非常有用。</p>
<p>给定一个表示 <strong>DNA序列</strong> 的字符串 <code>s</code> ,返回所有在 DNA 分子中出现不止一次的&nbsp;<strong>长度为&nbsp;<code>10</code></strong>&nbsp;的序列(子字符串)。你可以按 <strong>任意顺序</strong> 返回答案。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>s = "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"
<strong>输出:</strong>["AAAAACCCCC","CCCCCAAAAA"]
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>s = "AAAAAAAAAAAAA"
<strong>输出:</strong>["AAAAAAAAAA"]
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
<li><code>s[i]</code><code>==</code><code>'A'</code><code>'C'</code><code>'G'</code>&nbsp;or&nbsp;<code>'T'</code></li>
</ul>