[프로그래머스/Swift] lv3 : 베스트앨범
문제
https://school.programmers.co.kr/learn/courses/30/lessons/42579
풀이
중첩 dictionary 활용 [String:[Int:Int]]
장르 : [인덱스:플레이횟수] 형태로 주어진 배열들의 값을 저장
전체 플레이 횟수를 저장하는 dictionary를 선언하여, 이를 기준으로 key 정렬
정렬된 Key를 loop를 통해 순회하며 순차적으로 return value에 알맞게 append
...
studio-pendant.hashnode.dev2 min read