Skip to content

Commit 632ec1b

Browse files
authored
Update find-the-longest-substring-containing-vowels-in-even-counts.cpp
1 parent 5507f8d commit 632ec1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/find-the-longest-substring-containing-vowels-in-even-counts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Solution {
66
int findTheLongestSubstring(string s) {
77
static const string VOWELS = "aeiou";
88
int result = 0, mask = 0;
9-
vector<int> lookup(32, -2);
9+
vector<int> lookup(1 << VOWELS.length(), -2);
1010
lookup[0] = -1;
1111
for (int i = 0; i < s.length(); ++i) {
1212
const auto& pos = VOWELS.find(s[i]);

0 commit comments

Comments
 (0)