We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- Pangrams
- Discussions
Pangrams
Pangrams
Sort by
recency
|
1906 Discussions
|
Please Login in order to post a comment
Here's my Python3 solution
Here is my c++ solution, you can watch the explanation here : https://youtu.be/-8w6U6qPNrA
for Python3 Platform
def pangrams(s): return "pangram" if len(set(s.lower())) == 27 else "not pangram"
s = input()
result = pangrams(s)
print(result)
C/C++ Two options. With and without STL hashmap/hashtable structures. Could have used unordered_set, but meh.
//std::unordered_map freq; const int range = 'z' - 'a' + 1; /* there will be an invalid range from '[' (value 5B) until '`' (value 60). Will filter them out */ int freq[range] = {0};
cpp