mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-27 00:16:30 +08:00
build
This commit is contained in:
parent
7645bf97df
commit
dfa5ebdffa
1 changed files with 2 additions and 2 deletions
|
@ -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]]++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue