Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow authored Jun 17, 2023
1 parent dc06595 commit 2e79fce
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions count-vowel-strings-in-ranges/index.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@ package com.github.masx200.leetcode_test.count_vowel_strings_in_ranges

class Solution {
fun vowelStrings(words: Array<String>, queries: Array<IntArray>): IntArray {


val prefixs = IntArray(words.size) { 0 }

words.forEachIndexed { i, s ->
if (i == 0) {

prefixs[i] = booleanToInt(isVowelString(s))
} else {
prefixs[i] = prefixs[i - 1] + booleanToInt(isVowelString(s))

}

}
return IntArray(queries.size) {
val li = queries[it][0]
Expand Down

0 comments on commit 2e79fce

Please sign in to comment.