EPAM Systems OA (2023) | Count Vowel Substrings of a Word | Sliding Window & HashSet

Question · Posted Jun 2026

Problem Statement You are given a string word consisting of lowercase English letters. A substring is called a vowel substring if: Every character in the substring is a vowel (a, e, i, o, u). All five vowels appear at least once in the substring. Your task is to return the total number of vowel substrings present in the given string. Example 1 Input: word = "aeiouu" Output: 2 Explanation: Valid vowel substrings are: "aeiou" "aeiouu" Hence, the answer is 2. ...

The full answer & interview discussion are available to premium members.

Log in Create a free account