You are viewing a single comment's thread. Return to all 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"; }
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Pangrams
You are viewing a single comment's thread. Return to all comments →
My C++ solution: