You are viewing a single comment's thread. Return to all comments →
Swift solution
`func countingSort(arr: [Int]) -> [Int] { var frequencyArray = Array(repeating: 0, count: 100)
for num in arr { frequencyArray[num] += 1 } return frequencyArray`
}
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
Swift solution
`func countingSort(arr: [Int]) -> [Int] { var frequencyArray = Array(repeating: 0, count: 100)
}