Skip to content

Commit c4870ff

Browse files
committed
Update index.kt
1 parent dc06595 commit c4870ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

count-vowel-strings-in-ranges/index.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Solution {
2222
if (li == ri) booleanToInt(isVowelString(words[li])) else prefixs[ri] - if (li == 0) 0 else prefixs[li - 1]
2323
}
2424
}
25-
25+
private val vowels = hashSetOf('a', 'e', 'i', 'o', 'u')
2626
private fun isVowelString(s: String): Boolean {
27-
val vowels = hashSetOf('a', 'e', 'i', 'o', 'u')
27+
2828
return s.isNotEmpty() && vowels.contains(s[0]) && vowels.contains(s.last())
2929
}
3030

0 commit comments

Comments
 (0)