You are viewing a single comment's thread. Return to all comments →
Swift :
func missingNumbers(arr: [Int], brr: [Int]) -> [Int] { var storageArr = Array(repeating: 0, count: 10001) var resultArr: [Int] = [] for i in 0..<arr.count { storageArr[arr[i]] -= 1 } for i in 0..<brr.count { storageArr[brr[i]] += 1 } for i in 0..<storageArr.count { if storageArr[i] > 0 { resultArr.append(i) } } return resultArr }
Seems like cookies are disabled on this browser, please enable them to open this website
Missing Numbers
You are viewing a single comment's thread. Return to all comments →
Swift :