100% space | Bitmask | Easy | C++
\nclass Solution {\npublic:\n    int num=1065233;\n    // this is how num created\n    // int num=0;\n    // for(int i=0;i<=26;i++){\n    //     char ch=\'a\'+i
```\nclass Solution {\npublic:\n    int num=1065233;\n    // this is how num created\n    // int num=0;\n    // for(int i=0;i<=26;i++){\n    //     char ch=\'a\'+i;\n    //     if(ch==\'a\' || ch==\'e\' || ch==\'i\' || ch==\'o\' || ch==\'u\'){\n    //         num+=(1<<i);\n    //     }\n    // }\n    // cout<<num<<"\\n";\n    long long countVowels(string &W) {\n        long long ans=0;\n        int n=W.size();\n        \n        for(int i=0;i<n;i++){\n            int dig=W[i]-\'a\';\n            if(num&(1<<dig)){\n                ans+=1LL*(i+1)*(n-i);\n            }\n        }\n        return ans;\n    }\n};\n```
['String', 'C', 'Bitmask']