Skip to main content
Back to problems
Leetcode
Medium
Strings
Arrays
Hash Maps
Vowel Consonant Score

Compute a score for a string based on how vowels and consonants are distributed, typically by counting occurrences across substrings or positions.

Acceptance 0%
Problem Statement

Vowel Consonant Score

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.

Notes

  • Vowels are usually one of {a, e, i, o, u}.
  • All other lowercase letters are consonants.
  • The exact scoring rule may involve counting, summing, or comparing contributions from vowels and consonants.

Input Format

  • A string s of lowercase English letters.
  • Additional parameters may be present depending on the variant, but they are not available from the provided metadata.

Output Format

  • Return an integer representing the computed vowel-consonant score.

Constraints

  • 1 <= s.length.
  • s contains only lowercase English letters.
  • Exact numeric limits are not available from the provided metadata.
Examples
Sample cases returned by the problem API.

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

Unlock deeper context for this problem

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.

Guided hints
Editorial and discussion links
Concept map and variants
Sign in to unlock
Track your progress
Sign in to bookmark this problem, save notes, and manage its revision plan.