单项选择题

对于长度为n的线性表,在最坏情况下,下列各排序法所对应的比较次数中正确的是______。

A.冒泡排序为n/2
B.冒泡排序为n
C.快速排序为n
D.快速排序为n(n-1)/2
<上一题 目录 下一题>
热门 试题

填空题
假设int a=1,b=2;,则表达式(++a b)*b--的值为()。
单项选择题
已知有定义constintD=5;inti=1;doublef=0.32;charc=15;则下列选项错误的是( )。
A. Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_               X As Single, Y As Single)   If Button=2 Then PopupMenu Bt, 2  End Sub
B.Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _               X As Single, Y As Single)   PopupMenu Bt  End Suh
C. Private Sub Form MouseDown(Button As Integer, Shift As Integer, _               X As Single, Y As Single)   PopupMenu Bt,0  End Sub
D.Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _               X As Single, Y As Single)   If (Button=vbLeftButton) Or ( Button=vbRightButton) Then PopupMenu Bt  End Sub
相关试题
  • C++程序是从【 】函数开始执行的。
  • 内联函数是通过【 】来实现的,因此内联函...
  • C++语句const char * const p= he...
  • 在MyClass类的定义中,对赋值运算符 = ...
  • 已有定义double *p;,请写出完整的语句...