You are given an array arr of n strings. The strings consist of lowercase Latin letters. The value of each string is de ned as the difference between the number of consonants and vowels. You have
to nd the string with the maximum value. If there is a tie between some strings, the first one
should be returned.
Example 1:
Input:
n = 3
arr = {"house","car","tree"}
Output:
"house"
Explanation:
The strings "house" and "car" both have value 1. So, "house" should be answer.
-------
就是判断字符串中元音跟辅音数字差,写个函数即可,然后每次遇到最大的,更新最大值,跟相应的索引即可,只是max初始要设置成-1,不能是0,WA了一次。