Kotlin/코딩테스트
[프로그래머스] 옹알이 (1) - kotlin
깨노비
2023. 3. 9. 22:14
728x90
반응형
class Solution {
fun solution(babbling: Array<String>): Int {
val regex = "aya|ye|woo|ma".toRegex()
return babbling.map { s: -> s.replace(regex, "") }
.count { s -> s.isEmpty() }
}
}
728x90
반응형