You are given a string s consisting of words separated by a single space.
Determine the number of vowels in the first word of s, where vowels are defined as 'a', 'e', 'i', 'o', and 'u'. For each subsequent word in s, if its vowel count equals the vowel count of the first word, reverse the characters of that word. The first word itself remains unchanged.
Return the modified string.
Constraints:
s.length
s consists of lowercase English letters and spaces.
Words in s are separated by a single space.
s does not contain leading or trailing spaces.
You are given a string s consisting of words separated by a single space.
Determine the number of vowels in the first word of s, where vowels are defined as 'a', 'e', 'i', 'o', and 'u'. For each subsequent word in s, if its vowel count equals the vowel count of the first word, reverse the characters of that word. The first word itself remains unchanged.
Return the modified string.
Constraints:
s.length
s consists of lowercase English letters and spaces.
Words in s are separated by a single space.
s does not contain leading or trailing spaces.