String Patterns (Also for Core/Database Intern :)

Problem Overview

  • Compute how many unique lowercase English words of length wordLen can be formed with at most maxVowels consecutive vowels.
  • Input: wordLen (1–2500), maxVowels (0–wordLen); Output: count modulo 1,000,000,007.
  • Domain: string combinatorics/text processing with vowels (a,e,i,o,u) and 21 consonants.
  • From Snowflake interviews; a common coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: