A DNA sequence consists of a series of nucleotides, each represented by one of the characters 'A', 'C', 'G', or 'T'.
Given a string s representing a DNA sequence, find and return all s. The result may be returned in any order.
Constraints:
s.length
s[i] is one of 'A', 'C', 'G', or 'T'
The key idea is to use a sliding window of fixed size seen). Whenever a substring is encountered for exactly the second time, we add it to our result list. By only appending when the count equals
A DNA sequence consists of a series of nucleotides, each represented by one of the characters 'A', 'C', 'G', or 'T'.
Given a string s representing a DNA sequence, find and return all s. The result may be returned in any order.
Constraints:
s.length
s[i] is one of 'A', 'C', 'G', or 'T'
The key idea is to use a sliding window of fixed size seen). Whenever a substring is encountered for exactly the second time, we add it to our result list. By only appending when the count equals