A string is considered beautiful if it meets the following conditions:
It contains every one of the 'a', 'e', 'i', 'o', and 'u') at least once.
Its characters are arranged in nondecreasing alphabetical order (that is, every 'a' occurs before any 'e', every 'e' occurs before any 'i', every 'i' occurs before any 'o', and every 'o' occurs before any 'u').
Given a string word consisting of English vowels, return the length of the longest beautiful substring in word. If no beautiful substring is present, return
A substring is a contiguous sequence of characters within a string.
Constraints:
word.length
word consists of characters 'a', 'e', 'i', 'o', and 'u'.
A string is considered beautiful if it meets the following conditions:
It contains every one of the 'a', 'e', 'i', 'o', and 'u') at least once.
Its characters are arranged in nondecreasing alphabetical order (that is, every 'a' occurs before any 'e', every 'e' occurs before any 'i', every 'i' occurs before any 'o', and every 'o' occurs before any 'u').
Given a string word consisting of English vowels, return the length of the longest beautiful substring in word. If no beautiful substring is present, return
A substring is a contiguous sequence of characters within a string.
Constraints:
word.length
word consists of characters 'a', 'e', 'i', 'o', and 'u'.