Any one who is done with hackwithinfi today please post your questions… I know you might not have took photo or Screenshot but it you will tell us what were your questions this will be very helpful… And please share your experiences about difficulty level of questions… This will be very helpful if any one can help:blush:
Yes please share the question statements, or just tell us what type of questions were there or the difficulty level.
5 questions will be there. but each person got 3 questions only randomly which are not our choice.
I know 2 questions only from my seniors,
A string is there which consists of and | .we have to calculate how many * are in between consecutive | in the substrings.we have to print the array which consists of no of * between |.
first_index=1(it starts with 1 not 0)
so, we have to print array like (2,1)
where 2 represents the number of stars between first ‘|’ and 2nd ‘|’
where 1 represents the number of stars between 2nd | and 3rd|.
because there is no consecutive | in the string
there is a string which consists of only vowels.
we have to find out how many substrings are there in the given string .but,one thing that substring consists all vowels .any vowel can be repeat.
now we have to print the no of strings are 4
2nd string aeiou
4th string aeioua
there can be one more aaeioua?
for the first example, don’t we have to print the array (2, 2) instead of (2, 1)?
can you please explain the forst question looks little confusing
Yeah, please explain the first question. Also, the string itself can be considered as a sub string right in the second question?
How 4 is answer as u said that string contains only vowels and substring also contain vowel then total substring will be n*n-1/2
Yeah, exactly what I think, count the vowels and take up all possible combinations
its not a sub string right.its given string .we have to calculate only subsrings
sry 4 that for my mistake.
yes.as u said array that we have to print is(2,2)
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…
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
for this ans is 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
see for this ans is only 1
that is “eioua”
dont bother abt duplicates