Skip to content

Commit 9aad224

Browse files
committed
[level 2] Title: 전화번호 목록, Time: 173.65 ms, Memory: 103 MB -BaekjoonHub
1 parent 81b65b5 commit 9aad224

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

프로그래머스/2/42577. 전화번호 목록/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [level 2] 전화번호 목록 - 42577
22

3-
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/42577)
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/42577?language=java)
44

55
### 성능 요약
66

7-
메모리: 29.9 MB, 시간: 108.24 ms
7+
메모리: 103 MB, 시간: 173.65 ms
88

99
### 구분
1010

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

1717
### 제출 일자
1818

19-
2025년 04월 14일 18:43:10
19+
2026년 05월 08일 19:09:44
2020

2121
### 문제 설명
2222

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import java.util.*;
2+
3+
class Solution {
4+
public boolean solution(String[] phone_book) {
5+
Arrays.sort(phone_book);
6+
7+
for (int i = 0;i < phone_book.length-1; i++){
8+
if (phone_book[i+1].startsWith(phone_book[i])){
9+
return false;
10+
}
11+
}
12+
return true;
13+
}
14+
}

0 commit comments

Comments
 (0)