We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24dc3c1 commit 41c2931Copy full SHA for 41c2931
프로그래머스/2/42577. 전화번호 목록/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 98.9 MB, 시간: 364.95 ms
+메모리: 97.7 MB, 시간: 322.58 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2026년 02월 11일 16:15:37
+2026년 02월 11일 16:19:03
20
21
### 문제 설명
22
프로그래머스/2/42577. 전화번호 목록/전화번호 목록.java
@@ -4,8 +4,8 @@ class Solution {
public boolean solution(String[] phone_book) {
Arrays.sort(phone_book);
- for (int i = 0 ; i < phone_book.length - 1; i++) {
- if (phone_book[i + 1].startsWith(phone_book[i])) {
+ for (int i = 0; i < phone_book.length - 1; i++) {
+ if (phone_book[i + 1].indexOf(phone_book[i]) == 0) {
return false;
}
11
0 commit comments