Class Solution
java.lang.Object
g0101_0200.s0187_repeated_dna_sequences.Solution
187 - Repeated DNA Sequences.<p>Medium</p>
<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><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = “AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT”</p>
<p><strong>Output:</strong> [“AAAAACCCCC”,“CCCCCAAAAA”]</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = “AAAAAAAAAAAAA”</p>
<p><strong>Output:</strong> [“AAAAAAAAAA”]</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>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
findRepeatedDnaSequences
-