Check if the Sentence Is Pangram LeetCode solution in C++

1
class Solution {
2
public:
3
bool checkIfPangram(string sentence) {
4
vector<int> v(26, 0);
5
for (auto x : sentence) {
6
v[x - 'a'] = 1;
7
}
8
return accumulate(begin(v), end(v), 0) == 26;
9
}
10
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0