Fix the deconstructor of linkedlist_queue.cpp

This commit is contained in:
krahets
2023-03-16 18:43:13 +08:00
parent fcdc96e03d
commit 0840bc2043
9 changed files with 16 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ func digit(num: Int, exp: Int) -> Int {
}
/* nums k */
func countSort(nums: inout [Int], exp: Int) {
func countingSort(nums: inout [Int], exp: Int) {
// 0~9 10
var bucket = Array(repeating: 0, count: 10)
let n = nums.count
@@ -54,7 +54,7 @@ func radixSort(nums: inout [Int]) {
// k = 2 -> exp = 10
// k = 3 -> exp = 100
// exp = 10^(k-1)
countSort(nums: &nums, exp: exp)
countingSort(nums: &nums, exp: exp)
}
}