프로그래머스 - 숫자 짝꿍
·
Algorithm/programmers
import Foundationfunc solution(_ X:String, _ Y:String) -> String { let s: Set = Set(X) var arr: [String] = [] for i in s { let xcount = X.filter { $0 == i }.count let ycount = Y.filter { $0 == i }.count arr.append(String(repeating: i, count: xcount