O. [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++
GESP 2023.09 C++ 四级 全真模拟赛
- 状态
- 已结束
- 规则
- OI
- 题目
- 27
- 开始于
- 2026-11-20 13:29
- 结束于
- 2026-11-25 13:29
- 持续时间
- 2 小时
- 主持人
- 参赛人数
- 0