Open lenaios opened 3 years ago
func solution(_ s:String) -> [Int] {
return s.split { !$0.isNumber }
.map { Int(String($0))! }
.reduce(into: [Int:Int]()) { $0[$1] = $0[$1] != nil ? $0[$1]! + 1 : 1 }
.sorted { $0.value > $1.value }
.map { $0.0 }
}
https://programmers.co.kr/learn/courses/30/lessons/64065
@ghis22130 둠바 다 풀었네~😊