1 day ago · Science · 0 comments

The challenge Given a lowercase string of letters (no spaces, no digits), return the length of the longest substring made only of vowels (aeiou). Examples: solve("codewarriors"); // → 2 (the "io" in warriors) solve("suoidea"); // → 3 (the "uoi") solve("aeioaexaeuoiou"); // → 7 (the "aeuoiou") solve("bcd"); // → 0 solve("a"); // → 1 The Codewars Kata in the JavaScript track uses aeioaexaeuoiou as a tie-breaker test. The two vowel runs in that string are aeioae (6) and aeuoiou (7) — the answer is 7.

No comments yet. Log in to reply on the Fediverse. Comments will appear here.