class Solution { public int[] vowelStrings(String[] words, int[][] queries) { int n = words.length; int [] prefix = new int[n]; prefix[0] = isVowel(words[0]); for(int i=1;i
This is my solution I have alredy solved the question and come for the new Idea class Solution { public int[] vowelStrings(String[] words, int[][] queries) { int [] prefWords = new int[words.length]; int [] resQueries = new int[queries.length]; // for storing the valid vowelStrings prefix sum. if(isValid(words[0])) prefWords[0] += 1; for(int i=1; i
i did this like this..similar like u it was 30% faster ......but why its slow? TC toh kaam hai class Solution { // using prefix sum approach public int[] vowelStrings(String[] words, int[][] queries) { Set set=new HashSet(); set.add('a'); set.add('e'); set.add('i'); set.add('o'); set.add('u'); int freq[]=new int[words.length+1]; // will store prefix (index will be +1)
like target is 150, Please do like if you have understood the explanation as well as the code😄😄
bhaiya aaj ki video kab aa rahi hai
sir hairstyle mast lag raha he. Jay jagannath🙏.
nice
Thanks
Sir You are the person that's why I am ready to fight with POTD 🙂🙂🙂
love you sir
Thanks ❤
class Solution {
public int[] vowelStrings(String[] words, int[][] queries) {
int n = queries.length;
Listres = new ArrayList();
for(int i=0;i
Shash we do support you and can you please from today make sure to keep potds and all approaches and the concepts😅
Bhaiya Leetcode contest pr bhi solution explanation video banao please
class Solution {
public int[] vowelStrings(String[] words, int[][] queries) {
int n = words.length;
int [] prefix = new int[n];
prefix[0] = isVowel(words[0]);
for(int i=1;i
How much % faster?
@shashwat_tiwari_st 59 %
@@nishantrathore5031 🤘
This is my solution I have alredy solved the question and come for the new Idea
class Solution {
public int[] vowelStrings(String[] words, int[][] queries) {
int [] prefWords = new int[words.length];
int [] resQueries = new int[queries.length];
// for storing the valid vowelStrings prefix sum.
if(isValid(words[0])) prefWords[0] += 1;
for(int i=1; i
i did this like this..similar like u it was 30% faster ......but why its slow? TC toh kaam hai
class Solution {
// using prefix sum approach
public int[] vowelStrings(String[] words, int[][] queries) {
Set set=new HashSet();
set.add('a');
set.add('e');
set.add('i');
set.add('o');
set.add('u');
int freq[]=new int[words.length+1]; // will store prefix (index will be +1)
for(int i=0;i
Typical leetcode behavior, ignore 🙄