• + 0 comments

    My C++ solution:

    string pangrams(string s) {
        bitset<26> alpha;
        for(char c: s){
            int temp = tolower(c) - 'a';
            if(temp > 25 || temp < 0)continue;
            alpha.set(temp);
        }
        if(alpha.count() == 26)return "pangram";
        return "not pangram";
    }