NeetCode #740LC-1220Hard2-D Dynamic Programming
← Back to All Problems#740 · #1220 · Count Vowels Permutation(统计元音字母序列的数目)
📌 Problem Statement & Constraints
Count the number of strings of length
n over the vowels a, e, i, o, u such that each character is followed only by allowed letters: a to e; e to a or i; i to a, e, o, u; o to i or u; u to a. Return the count modulo 1e9+7. Constraints: 1 <= n <= 2 * 10^4.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!