Skip to content

Practice Count Vowel Substrings of a String

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#2062
LeetCode Problem

Count Vowel Substrings of a String

Problem Statement

A substring is a contiguous (non-empty) sequence of characters within a string. A vowel substring is a substring that only consists of vowels ('a', 'e', 'i', 'o', and 'u') and has all five vowels present in it. Given a string word, return the number of vowel substrings in word.

Source: Count Vowel Substrings of a String on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
word = "aeiouu"
Output
2

# Example 2

Input
word = "unicornarihan"
Output
0

# Example 3

Input
word = "cuaieuouac"
Output
7

Constraints

1 <= word.length <= 100
word consists of lowercase English letters only.

Related LeetCode Problems

Practice more problems similar to Count Vowel Substrings of a String.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.