From e5ef4d73aaa267a5aee05bbd473b90102722ebf6 Mon Sep 17 00:00:00 2001 From: kjs254 <149364697+kjs254@users.noreply.github.com> Date: Tue, 2 Apr 2024 22:13:46 +0900 Subject: [PATCH] 2024-04-02 --- kjs254/README.md | 1 + ...224\353\262\210\355\230\270 \353\252\251\353\241\235.py" | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 "kjs254/\355\225\264\354\213\234/\354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.py" diff --git a/kjs254/README.md b/kjs254/README.md index 09d98ff..a83e873 100644 --- a/kjs254/README.md +++ b/kjs254/README.md @@ -11,4 +11,5 @@ | 7차시 | 2024.03.01 | 구현 | [캐시](https://school.programmers.co.kr/learn/courses/30/lessons/17680) | [#24](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/24) | | 8차시 | 2024.03.08 | 구현 | [튜플](https://school.programmers.co.kr/learn/courses/30/lessons/64065) | [#30](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/30) | | 9차시 | 2024.03.10 | 구현 | [뉴스 클러스터링](https://school.programmers.co.kr/learn/courses/30/lessons/17677) | [#33](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/33) | +| 10차시 | 2024.04.02 | 해시 | [전화번호 목록](https://school.programmers.co.kr/learn/courses/30/lessons/42577) | [#46](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/46) | --- \ No newline at end of file diff --git "a/kjs254/\355\225\264\354\213\234/\354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.py" "b/kjs254/\355\225\264\354\213\234/\354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.py" new file mode 100644 index 0000000..9e6e9bf --- /dev/null +++ "b/kjs254/\355\225\264\354\213\234/\354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.py" @@ -0,0 +1,6 @@ +def solution(phone_book): + phone_book.sort() + for i in range(len(phone_book)-1): + if phone_book[i+1].startswith(phone_book[i]): + return False + return True \ No newline at end of file