aboutsummaryrefslogtreecommitdiff
path: root/check_pangram_sentence.cpp
blob: 67f1af283406e44d614d39f5c46ae22af38be443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "leetcode.h"

class Solution {
public:
  bool checkIfPangram(string sentence) {
    set<int> s;
    for (auto &i : sentence)
      s.insert(i);
    return s.size() == 26;
  }
};

int main() {
  Solution obj;
  if (obj.checkIfPangram("thequickbrownfoxjumpsoverthelazydog"))
    cout << "true";
  else
    cout << "false";
}