We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fc0446 commit e3b3fb5Copy full SHA for e3b3fb5
src/go/radix_sort.go
@@ -24,23 +24,23 @@ func RadixSort(slice []int) {
24
var bucket [10]int
25
26
for index := 0; index < length; index++ {
27
- bucket[(slice[index]/exp)%10]++
+ bucket[(slice[index]/exp)%10]++
28
}
29
30
for index := 1; index < 10; index++ {
31
- bucket[index] += bucket[index-1]
+ bucket[index] += bucket[index-1]
32
33
34
for index := length - 1; index >= 0; index-- {
35
- bucket[(slice[index]/exp)%10]--
+ bucket[(slice[index]/exp)%10]--
36
temp[bucket[(slice[index]/exp)%10]] = slice[index]
37
38
39
40
slice[index] = temp[index]
41
42
43
- exp *= 10
+ exp *= 10
44
45
46
0 commit comments