From 57d69195b79ee4c7e65462f1214e49dc6b9c438c Mon Sep 17 00:00:00 2001 From: chayan das <110921638+Chayandas07@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:11:17 +0530 Subject: [PATCH] Create 2559. Count Vowel Strings in Ranges --- 2559. Count Vowel Strings in Ranges | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 2559. Count Vowel Strings in Ranges 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