mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
update
This commit is contained in:
25
leetcode/problem/repeated-dna-sequences.html
Normal file
25
leetcode/problem/repeated-dna-sequences.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<p>The <strong>DNA sequence</strong> is composed of a series of nucleotides abbreviated as <code>'A'</code>, <code>'C'</code>, <code>'G'</code>, and <code>'T'</code>.</p>
|
||||
|
||||
<ul>
|
||||
<li>For example, <code>"ACGAATTCCG"</code> is a <strong>DNA sequence</strong>.</li>
|
||||
</ul>
|
||||
|
||||
<p>When studying <strong>DNA</strong>, it is useful to identify repeated sequences within the DNA.</p>
|
||||
|
||||
<p>Given a string <code>s</code> that represents a <strong>DNA sequence</strong>, return all the <strong><code>10</code>-letter-long</strong> sequences (substrings) that occur more than once in a DNA molecule. You may return the answer in <strong>any order</strong>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<pre><strong>Input:</strong> s = "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"
|
||||
<strong>Output:</strong> ["AAAAACCCCC","CCCCCAAAAA"]
|
||||
</pre><p><strong>Example 2:</strong></p>
|
||||
<pre><strong>Input:</strong> s = "AAAAAAAAAAAAA"
|
||||
<strong>Output:</strong> ["AAAAAAAAAA"]
|
||||
</pre>
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= s.length <= 10<sup>5</sup></code></li>
|
||||
<li><code>s[i]</code> is either <code>'A'</code>, <code>'C'</code>, <code>'G'</code>, or <code>'T'</code>.</li>
|
||||
</ul>
|
Reference in New Issue
Block a user