Skip to content

Commit

Permalink
Merge pull request #141 from masx200/deno-dependency-updates
Browse files Browse the repository at this point in the history
format
  • Loading branch information
masx200 authored Jun 17, 2023
2 parents b77aa25 + c0e0176 commit 5ba6c42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions count-vowel-strings-in-ranges/index.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ class Solution {
if (li == ri) booleanToInt(isVowelString(words[li])) else prefixs[ri] - if (li == 0) 0 else prefixs[li - 1]
}
}
private val vowels = hashSetOf('a', 'e', 'i', 'o', 'u')
private val vowels = hashSetOf('a', 'e', 'i', 'o', 'u')
private fun isVowelString(s: String): Boolean {

return s.isNotEmpty() && vowels.contains(s[0]) && vowels.contains(s.last())
}

Expand Down

0 comments on commit 5ba6c42

Please sign in to comment.