mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 18:00:18 +08:00
build
This commit is contained in:
@@ -103,7 +103,7 @@ comments: true
|
||||
func countingSortNaive(nums []int) {
|
||||
// 1. 统计数组最大元素 m
|
||||
m := 0
|
||||
for num := range nums {
|
||||
for _, num := range nums {
|
||||
if num > m {
|
||||
m = num
|
||||
}
|
||||
@@ -424,7 +424,7 @@ $$
|
||||
func countingSort(nums []int) {
|
||||
// 1. 统计数组最大元素 m
|
||||
m := 0
|
||||
for num := range nums {
|
||||
for _, num := range nums {
|
||||
if num > m {
|
||||
m = num
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user