def solution(phone_book):
phone_book.sort()
for phone_number_index in range(len(phone_book) - 1):
for the_other_phone_number_index in range(phone_number_index + 1, len(phone_book)):
if phone_book[the_other_phone_number_index].startswith(phone_book[phone_number_index]):
return False
return True
'Problem-solving > 프로그래머스' 카테고리의 다른 글
프로그래머스 - (2018 KAKAO BLIND RECRUITMENT) [1차] 뉴스 클러스터링 (Python) (0) | 2020.05.08 |
---|---|
프로그래머스 - (2019 카카오 개발자 겨울 인턴십) 튜플 (Python) (0) | 2020.05.08 |
프로그래머스 - 더 맵게 (Python) (0) | 2020.05.07 |
프로그래머스 - 소수 찾기 (Python) (0) | 2020.05.07 |
프로그래머스 - 소수 찾기 (Python) (0) | 2020.05.06 |
댓글