Search
⌘K

Leetcode 2947. Count Beautiful Substrings I

Count the number of contiguous substrings of s where the number of vowels equals the number of consonants and the product of those counts is divisible by k. The core challenge is combining the equality constraint on counts with a modular divisibility condition to count eligible substrings efficiently across up to n=1000 characters.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.