Hackwithinfi questions

i am not able to get your point of you in calculating vowels like the formula .i think if you just go through the string then u can able to catch it.

No I think u didn’t explain question clearly…

1 Like

how you give formula to that query? can i know?

hay pleaese explain my first question looks little consfusing pleaseee

Actually if you said that the original string contains only vowels and you have to count the substance which have vowels only so can you please explain me that only was in how is the possible that in substrings there may be other than vowels.

And plz can u explain your question with another example

I think the approach to the 2nd question may be like this:
((no of vowels) * (no of vowels -1)/2) - (no of duplicate vowels)

see if i take an another example that is
string=aeioua
for this ans is 2
aeiou-1
eioua-2
those r two substrings
which contain all vowels
we can take another substring “aeio”,but it doent have all vowels
so we dont calculate that
“all substrings are not the substring which contain all vowels”
but all substrings which contain all vowels are substrings to the given string
eg:
aaeiuao
see for this ans is only 1
that is “eioua”

dont bother abt duplicates

Oh! Now I got it. It should contain ALL the vowels, (a,e,i,o,u). I was considering each string should contain at least 1 vowel.

can any one please explain me 1st problem how it is working

I also get it now …

This means you are interested the subtring length must be 5

hay bro bhargavi please explain the first question i am getting confused

it must not be 5 it may be more than 5 .but if we take worst case the length of the substring should be 5.
eg:
string=“aaeioua”
substring1=aaeiou
substring2=aeiou
substring3=eioua
substring4=aeioua
lengths are different

hay please explain first question bhargavi…

in that first query we have to print the array of no of stars ,those stars represents the no of stars between consecutive |'s.
eg:
(star(astric )cant be able to write in this .
so i represents like %)
|%|%|%%|%%
so ans to this is (1,1,2)
because the no of stars between 1st| and 2nd| are 1
the no of stars between 2nd| and 3rd| are 1
the no of stars between 3rd| and 4th| are 2
dont calculate last 2 stars because they are not in between |'s

1 Like

so fro second example it should be 2 as 2 star lies but you write 0 why?

Yes, I thought the same, for second example answer should be 2.

How much questions u solved completely

I think your examples are wrong
Ans of first example should be 2 0
and Ans of second example should be 2