You are viewing a single comment's thread. Return to all comments →
My solution in C++
string pangrams(string s) { vector<bool> isTrue(26); for(char chr : s){ chr = tolower(chr); if(static_cast<int>(chr)>=97 && static_cast<int>(chr)<=122 ) isTrue[static_cast<int>(chr)-97]=true; } bool allTrue = all_of(isTrue.begin(), isTrue.end(), [](bool n){return n;}); if(allTrue) return "pangram"; else return "not pangram"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
My solution in C++