填空题

对长度为10的线性表进行冒泡排序,最坏情况下需要比较的次数为 【1】 。

【参考答案】

45
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序:#include <iostream>using namespace std;class sample{private: int x; static int y;public: sample(int a); static void print(sample s);};sample:: sample(int a){ x=a; y+=x;}void sample:: print(sample s){ cout<< x= <<s. x<< ,y= <<y<<end1;}int sample:: y=0;int main(){ sample s1(10); sample s2(20); sample:: print(s2); return 0;}程序运行后的输出结果是( )。
A.x=10,y=20
B.x=20,y=30
C.x=30,y=20
D.x=30,y=30
单项选择题
下列叙述中正确的是( )。
A.线性链表是线性表的链式存储结构
B.栈与队列是非线性结构
C.双向链表是非线性结构
D.只有根结点的二叉树是线性结构
相关试题
  • 下列程序的输出结果是 【15】 。#incl...
  • 在下面程序的横线处填上适当的内容,使程序...
  • 写出下列程序的运行结果 【13】 。#in...
  • 下列程序的输出结果是 【12】 。#incl...
  • 类是一个支持集成的抽象数据类型,而对象是...