프로그래머스 - 달리기 경주
·
Algorithm/programmers
시간 초과import Foundationfunc solution(_ players:[String], _ callings:[String]) -> [String] { var playerNumber: [Int:String] = [:] for (index,name) in players.enumerated() { playerNumber[index+1] = name } for calling in callings { let tmp = playerNumber.filter({ $0.value == calling }).first let higherPlayer = playerNumber[tmp!.key-1] playerNumber[tmp!..
ytw_developer
'달리기 경주' 태그의 글 목록