为何我的W7没有100M分区?(靠!联想搞了1.17G!)# Hardware - 计算机硬件
s*g
1 楼
What kind of data structure is "arr" in the following C function:
int insert (data_struct_t arr, int x)
{
int i,j,t;
if (arr.num >= arr.size)
return -1;
i = arr.num++;
arr.data[i] = x;
for (j = i >> 1; i; i = j) {
if (arr.data[i] > arr.data[j]) {
t = arr.data[i];
arr.data[i] = arr.data[j];
arr.data[j] = t;
j = j >> 1;
} else {
break;
}
}
return 0;
}
int insert (data_struct_t arr, int x)
{
int i,j,t;
if (arr.num >= arr.size)
return -1;
i = arr.num++;
arr.data[i] = x;
for (j = i >> 1; i; i = j) {
if (arr.data[i] > arr.data[j]) {
t = arr.data[i];
arr.data[i] = arr.data[j];
arr.data[j] = t;
j = j >> 1;
} else {
break;
}
}
return 0;
}