max_len
to 0 to store the maximum length of a beautiful substring.len
to 1 to store the current length of the non-decreasing substring.count
to 1 to store the count of unique vowels encountered.len
.count
.count
equals 5, update max_len
with the maximum of max_len
and len
.len
and count
to 1.max_len
.