Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
thank you, I made a fork
Vowels which need to be counted can be described as elements of
cycle(aeiou)which is a subsequence of input. In your example, initialaeioare four wovels, and the next counted vowel has to beu, and that's why subsequentaeioare not counted.In other words: find next
a, then find nexte, theni, theno, thenu, then againa...Does this help?
"Your job is to find out how many ordered and consecutive vowels there are in the given string beginning from a. Keep in mind that the consecutive vowel to u is a and the cycle continues."
Given the input:
I would expect different possible interpretations:
9 if we count every vowel that appears in the correct cyclic order (subsequence interpretation)
4 if we only count the longest valid prefix before the sequence breaks
5 if we count exactly one full cycle (aeiou) and stop
However, the official expected answer is 5.
Could someone explain why the kata defines 5 as the correct result for this input, and which exact interpretation of the rules leads to that number?
longest would be interesting: word = "aeioaeaeaeaeu":
Ooh by consecutive you mean from the list of vowels no matter the order of vowels in the string
My solution should not have passed. You said consecutive vowels?
My solution solves for every other vowel
Superceded by Hob's latest fork
Good work!!! Thanks to author!
I would rather have a question that asks for the longest series of consecutive vowels, regardless if it starts with 'a'
Thank you for kata. From a first glance, looks like challenging and solid 6 kyu or higher. However a bit later, I'd say it's good 7 kyu kata!
CoffeeScript translation
good gata
Really nice kata, also more like a 6kyu one.
I agree lol
'max' as if 8 isn't the easiest, probably a 7 since 8s are pretty beginner oriented
Loading more items...