diff --git a/2559. Count Vowel Strings in Ranges b/2559. Count Vowel Strings in Ranges new file mode 100644 index 0000000..0637069 --- /dev/null +++ b/2559. Count Vowel Strings in Ranges @@ -0,0 +1,30 @@ +class Solution { +public: + + // to check if the char is vowel or not + bool checkvowel(char ch){ + if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u') return true; + return false; + } + + vector vowelStrings(vector& words, vector>& queries) { + + vectormpp(words.size()); // to store the prefix count of vowels + vectorans; // to store the result + int cnt=0; // to count string following the constraint + + // filling prefix vec + for(int i=0;i