【单选题】【消耗次数:1】
冒泡排序算法的运作如下(从后往前),排列顺序正确的是() (1)比较相邻的元素。如果第一个比第二个大,就交换他们两个。 (2)针对所有的元素重复以上的步骤,除了最后一个。 (3)对每一对相邻元素作同样的工作,从开始第一对到结尾的最后一对。在这一点,最后的元素应该会是最大的数。 (4)持续每次对越来越少的元素重复上面的步骤,直到没有任何一对数字需要比较。
1-2-3-4
1-3-2-4
1-4-2-3
1-2-4-3
参考答案:
复制
纠错
相关题目
【单选题】 已知inta[4][4]={{1,2},{3},{4},{1,2,3}};问a[2][0]该元素的值是()
①  2
②  3
③  4
④  1
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为?
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为?
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为(???)。
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为()。
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为( )。
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为( )。
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为()。
①  2
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[2][1]的值为?
①  0
②  4
③  6
④  8
【单选题】 假定一个二维数组的定义语句为“int a[3][4]={{3,4},{2,8,6}};”,则元素a[2][1]的值为( )。
①  0
②  4
③  8
④  6
随机题目
【单选题】 犯罪是( )的行为。
①  危害国家和人民利益
②  危害社会
③  违反法律
④  应受刑罚惩罚
【单选题】 The thieves _____ the possibility of the alarm system sounding
①  overtook
②  overcame
③  overlooked
④  overworked
【单选题】 He was _____her in intelligence.
①  below
②  under
③  beneath
④  down
【单选题】 The human race has already paid a heavy price for its slow _____to environmental threats.
①  response
②  responsibility
③  resolution
④  resistance
【单选题】 He did me a _____turn by lending me ten pounds.
①  good
②  nice
③  fine
④  pretty
【单选题】 Not until three years ago _____ to work outside.
①  he began
②  he begins
③  began he
④  did he begin
【单选题】 I _____him the Christmas gift by mail because he came home during the Christmas holidays.
①  ought to have sent
②  couldn’t have sent
③  must have sent
④  needn’t have sent
【单选题】 My friend and adviser _____ to lend me his money.
①  have agreed
②  has agreed
③  agreed
④  are agreed
【单选题】 When he bent down to tie his shoelace, the belt of his trousers _____.
①  ruined
②  cracked
③  broke
④  split
【单选题】 In today’s newspaper, it _____ that there will be a new election tomorrow.
①  tells
②  states
③  writes
④  records