188 days ago · Tech · hide · Fediverse post

The challenge Given a lowercase string of letters (no spaces, no digits), return the length of the longest substring that contains only vowels (aeiou). Examples: solve("codewarriors") # → 2 (the "io" in warriors) solve("suoidea") # → 3 (the "uoi") solve("aeioaexaeuoiou") # → 5 (the "aeioa" or "uoiou") solve("bcd") # → 0 solve("a") # → 1 The puzzle appears in Codewars in both Python and Java tracks. The aeioaexaeuoiou test case is the classic gotcha — make sure you handle two equally-long winners.

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town