You are viewing a single comment's thread. Return to all comments →
Kotlin Solution
fun birthday(s: Array<Int>, d: Int, m: Int): Int { return (0 until s.size-m+1).map { i -> s.slice(i until m+i) }.filter { it.sum() == d }.size }
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division 1
You are viewing a single comment's thread. Return to all comments →
Kotlin Solution