로딩
티스토리 데이터 처리 중입니다.

[Swift] 프로그래머스 옹알이(1) (lv.0)

 [Swift] 프로그래머스 옹알이(1) (lv.0)

[Swift] 프로그래머스 옹알이(1) (lv.0) 1. 문제 https://school.programmers.co.kr/learn/courses/30/lessons/120956 0렙에서 가장 정답률이 낮은 문제이다.

문자열 처리를 요구하는데, Swift에 있는 replacingOccurrences() 함수를 활용하면 그렇게 어렵지 않게 풀 수 있다. 2. 접근 어떤 문자열이 주어지든 간에 말할 수 있는 발음은 네 가지 밖에 없고, 각 문자열에서 최대 한 번씩만 등장하기 때문에 replacingOccurrences(of:with:)를 활용하면 된다. https://developer.apple.com/documentation/foundation/nsstring/1412937-replacingoccurren.....