#include <leetcode.h>
◆ findRepeatedDnaSequences()
vector< string > leetcode::repeated_dna_sequences::Solution::findRepeatedDnaSequences |
( |
string |
s | ) |
|
|
static |
在文件 leetcode.cpp 第 7274 行定义.
7275 vector<unsigned short>
vec(s.length());
7276 for(
int i = 0; i < s.length(); i++) {
7293 if(s.length() < 10) {
7296 unordered_map<unsigned, string> um;
7297 unordered_map<unsigned, unsigned> cnt;
7298 for(
int i = 0; i < 10; i++) {
7302 um[hsv] = s.substr(0, 10);
7304 const unsigned f = 262144;
7305 for(
int i = 10; i < s.length(); i++) {
7306 hsv -=
vec[i - 10] * f;
7309 um[hsv] = s.substr(i - 9, 10);
7313 for(
auto &[k, v]: um) {
7315 ans.emplace_back(v);
引用了 pat::a::a7_2::vec.
该类的文档由以下文件生成: