Repeated DNA Sequences
在给定字符串中寻找重复出现的序列,每个序列长度为10
可以采用unordered_map记录每个序列出现的个数,将出现超过一次的添加到结果集中
代码如下
class Solution {
public:
vector<string> findRepeatedDnaSequences(string s) {
if(s.size() < 10) return {};
vector<
在给定字符串中寻找重复出现的序列,每个序列长度为10
可以采用unordered_map记录每个序列出现的个数,将出现超过一次的添加到结果集中
代码如下
class Solution {
public:
vector<string> findRepeatedDnaSequences(string s) {
if(s.size() < 10) return {};
vector<