프로그래머스/Lv.0 [Swift] 외계어 사전 - import Foundation func solution(_ spell:[String], _ dic:[String]) -> Int { dic.map { String($0.sorted()) }.contains(spell.sorted().joined()) ? 1 : 2 } solution(["s", "o", "m", "d"], ["moos", "dzx", "smm", "sunmmo", "som"]) 공유하기 게시글 관리 iOS 개발 공부 저작자표시 '프로그래머스 > Lv.0' 카테고리의 다른 글 [Swift] 유한소수 판별하기 (0) 2023.01.05 [Swift] 외계행성의 나이 (0) 2023.01.05 [Swift] 옹알이 (1) (0) 2023.01.05 [Swift] 옷가게 할인 받기 (0) 2023.01.05 [Swift] 영어가 싫어요 (0) 2022.12.26 Contents 당신이 좋아할만한 콘텐츠 [Swift] 유한소수 판별하기 2023.01.05 [Swift] 외계행성의 나이 2023.01.05 [Swift] 옹알이 (1) 2023.01.05 [Swift] 옷가게 할인 받기 2023.01.05 댓글 0 + 이전 댓글 더보기