mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-13 10:42:08 +08:00
build
This commit is contained in:
@ -193,7 +193,7 @@ comments: true
|
||||
}
|
||||
// 2. 统计各数字的出现次数
|
||||
// counter[num] 代表 num 的出现次数
|
||||
int *counter = malloc(sizeof(int) * size);
|
||||
int *counter = malloc(sizeof(int) * m);
|
||||
for (int i = 0; i < size; i++) {
|
||||
counter[nums[i]]++;
|
||||
}
|
||||
@ -547,7 +547,7 @@ $$
|
||||
}
|
||||
// 2. 统计各数字的出现次数
|
||||
// counter[num] 代表 num 的出现次数
|
||||
int *counter = malloc(sizeof(int) * size);
|
||||
int *counter = malloc(sizeof(int) * m);
|
||||
for (int i = 0; i < size; i++) {
|
||||
counter[nums[i]]++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user