Skip to content

Commit c06871e

Browse files
committed
[level 1] Title: 옹알이 (2), Time: 27.84 ms, Memory: 64.5 MB -BaekjoonHub
1 parent 00fc27f commit c06871e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

프로그래머스/1/133499. 옹알이 (2)/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 성능 요약
66

7-
메모리: 64.8 MB, 시간: 26.83 ms
7+
메모리: 64.5 MB, 시간: 27.84 ms
88

99
### 구분
1010

@@ -16,7 +16,7 @@
1616

1717
### 제출 일자
1818

19-
2024년 05월 24일 14:25:33
19+
2024년 05월 24일 14:33:31
2020

2121
### 문제 설명
2222

프로그래머스/1/133499. 옹알이 (2)/옹알이 (2).kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ class Solution {
66
babblings.forEach {
77
var bab = it
88

9-
if (!it.checkingDuplicatedwords(canSay)) {
9+
if (!it.checkingDuplicatedWords(canSay)) {
1010
canSay.forEach { canSpeakWord ->
1111
bab = bab.replace(canSpeakWord, "")
1212
}
1313

14-
if (bab.replace("", "").isEmpty()) answer++
14+
if (bab.all{it.toString()==""}) answer++
1515
}
1616
}
1717

1818
return answer
1919
}
2020

21-
fun String.checkingDuplicatedwords(words: List<String>): Boolean {
21+
fun String.checkingDuplicatedWords(words: List<String>): Boolean {
2222
words.forEach {
2323
keyword ->
2424
if (this.contains(keyword + keyword)) return true
25-
25+
2626
}
2727

2828
return false

0 commit comments

Comments
 (0)