O(N) C++ | 10 lines
\n    long long countVowels(string A ) {\n        int N = A.size();\n        int a = 1 ;\n        int b = N ;\n        long long res = 0 ;\n        \n        un
```\n    long long countVowels(string A ) {\n        int N = A.size();\n        int a = 1 ;\n        int b = N ;\n        long long res = 0 ;\n        \n        unordered_set< char >st = { \'a\' , \'e\' , \'i\' , \'o\' , \'u\' };\n        \n        for( auto x : A )\n        {\n            if( st.find(x) != st.end() )\n                res += 1LL*a*b ;\n            \n            a++;\n            b--;\n        }\n        return res; \n    }\n```
['C']