![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
设有关键码序列(54,42,91,35,78,67,18,23,85),要按关键码值递增的次序排序,采用起泡排序法,第二趟起泡后的结果为()。
A.42,54,78,35,18,67,23,85,91
B.42,35,54,67,18,23,78,85,91
C.18,35,42,54,67,23,78,85,91
D.18,23,42,35,54,67,78,91,85
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)
A.42,54,78,35,18,67,23,85,91
B.42,35,54,67,18,23,78,85,91
C.18,35,42,54,67,23,78,85,91
D.18,23,42,35,54,67,78,91,85
设有关键码序列(17,8,3,25,16,1,13,19,18,4,6,21),要按关键码值递增的次序排序,用初始增量为4的希尔排序法,一趟扫描后的结果是【 】。
设有关键码序列(16,9,4,25,15,2,13,18,17,5,8,24),要按关键码值递增的次序排序,采用直接选择排序法,一趟扫描后的结果为(5)。
A.(2,9,4,25,15,16,13,18,17,5,8,24)
B.(15,2,4,18,16,5,8,24,17,9,13,25)
C.(9,4,16,15,2,13,18,17,5,8,24,25)
D.(9,16,4,25,2,15,13,18,5,17,8,24)
设有关键码序列(16,9,4,25,15,2,13,18,17,5,8,24),要按关键码值递增的次序排序,采用初始增量为4的希尔排序法,一趟扫描后的结果为
A.(15,2,4,18,16,5,8,24,17,9,13,25)
B.(2,9,4,25,15,16,13,18,17,5,8,24)
C.(9,4,16,15,2,13,18,17,5,8,24,25)
D.(9,16,4,25,2,5,13,18,5,17,8,24)
设有关键码序列(66,13,51,76,81,26,57,69,23),要按关键码值递增的次序,若采用快速排序法,并以第一个元素为划分的基准,那么第一趟划分后的结果头 ()。
A. 23,13,51,57,66,26,81,69,76
B. 13,23,26,51,57,66,81,76,69
C. 23,13,51,57,26,66,81,69,76
D. 23,13.51,57,81,26,66,69,76
设有关键码序列(Q,G,M,Z,A,N,B,P,X,H,Y,S,T,L,K,E),采用堆排序法进行排序,经过初始建堆后关键码值B在序列中的序号是()。
A)1
B)3
C)7
D)9
A.23,13,51,57,66,26,81,69,76
B.13,23,26,51,57,66,81,76,69
C.23,l3,51,57,26,66,81,69,76
D.23,13,51,57,81,26,66,69,76
设有一个关键码的输入序列(55,31,11,37,46,73,63,02,07):
(1)从空树开始构造平衡二叉搜索树,画出每加入一个新结点时二叉树的形态。若发生不平衡,指明需进行的平衡旋转的类型及平衡旋转的结果
(2)计算该平衡二叉搜索树在等概率下的搜索成功的平均搜索长度和搜索不成功的平均搜索长度。
设有关键码序列(Q,C,M,Z,A,N,B,P,X,H,Y,S,T,L,K,E),采用二路归并排序法进行排序,下面哪—个序列是第二趟归并后的结果?
A.C,Q,M,Z,A,N,B,P,H,X,S,Y,L,T,E,K
B.C,M,Q,Z,A,B,N,P,H,S,X,Y,E,K,L,T
C.C,M,Q,A,N,B,P,X,H,Y,S,T,L,K,E,Z
D.A,B,C,M,N,P,Q,Z,E,H,K,L,S,T,X,Y
A.(12,31,38,45,56,59,75,89)
B.(12,31,56,45,38,89,59,75)
C.(12,31,45,56,59,38,75,89)
D.(12,31,45,75,38,59,56,89)