Compute a score for a string based on how vowels and consonants are distributed, typically by counting occurrences across substrings or positions.
Given a string s consisting of lowercase English letters, compute a score that depends on vowels and consonants in the string.
A common interpretation of this type of problem is to compare or accumulate contributions from vowels and consonants, often by counting how many of each appear in a substring, prefix, or transformation of the string.
Your task is to determine the final score according to the rules described by the specific variant of the problem.
{a, e, i, o, u}.s of lowercase English letters.1 <= s.length.s contains only lowercase English letters.Example 1
Input
s = "abcde"
Output
5
Explanation
Illustrative example: vowels and consonants contribute according to the scoring rule, producing a total score of 5.
Example 2
Input
s = "aeiou"
Output
5
Explanation
Illustrative example: all characters are vowels, so only vowel contribution is counted.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.