mirror of
https://github.com/ShusenTang/LeetCode.git
synced 2026-08-23 23:24:45 +08:00
fix {{ bux
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
vector<string> findRepeatedDnaSequences(string s) {
|
||||
unordered_set<int>substr_set;
|
||||
unordered_set<string>output_set;
|
||||
unordered_map<int, int> mp{{'A', 0}, {'C', 1}, {'G', 2}, {'T', 3}}; // 注意学习这种初始化方法
|
||||
unordered_map<int, int> mp{ {'A', 0}, {'C', 1}, {'G', 2}, {'T', 3} }; // 注意学习这种初始化方法
|
||||
|
||||
int cur = 0; // 当前子串对应的int值
|
||||
for (int i = 0; i < 9; ++i) cur = (cur << 2) | mp[s[i]];
|
||||
|
||||
Reference in New Issue
Block a user