#GESP1865. [GESP]L4-202309-Q1865-S
[GESP]L4-202309-Q1865-S
在下列代码的横线处填写( ),完成对有 个 int 类型元素的数组 array 由小到大排序。
void BubbleSort(int array[], int n) {
for (int i = n; i >= 2; i--) {
for (______) // 在此处填入代码
if (array[j] > array[j + 1]) {
int t = array[j];
array[j] = array[j + 1];
array[j + 1] = t;
}
}
}
{{ select(1) }}
- int j = 1; j < n; j++
- int j = 0; j < n; j++
- int j = 0; j < i - 1; j++
- int j = 0; j < i; j++
相关
在下列比赛中: