You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
배열의 count를 dictionary에 저장한 다음, 짝수개를 가지는 key를 모두 제거하고 남는 하나의 key를 리턴한다.
💬 풀이
import Foundation
publicfunc solution(B :inout[Int])->Int{varcountDict:[Int:Int]=[:]
for i in B {
if countDict[i]==nil{countDict[i]=1}else{countDict[i]! +=1}}return countDict.filter{ $0.value %2==1}.first!.key
}
💬 문제
https://app.codility.com/programmers/lessons/2-arrays/odd_occurrences_in_array/
💬 Idea
💬 풀이
소요시간
: 11분https://app.codility.com/demo/results/training95K8QQ-KYV/
The text was updated successfully, but these errors were encountered: