用直接插入排序对下面四个序列进行递增排序,元素比较次数最少的是()。A.94,3

练习题库2022-08-02  45

问题 用直接插入排序对下面四个序列进行递增排序,元素比较次数最少的是()。A.94,32,40,90,80,46,21,69B.32,40,21,46,69,94,90,80C.21,32,46,40,80,69,90,94D.90,69,80,46,21,32,94,40

选项 A.94,32,40,90,80,46,21,69
B.32,40,21,46,69,94,90,80
C.21,32,46,40,80,69,90,94
D.90,69,80,46,21,32,94,40

答案 C

解析 直接插入排序对于基本有序的序列进行排序效率最高。
转载请注明原文地址:https://tihaiku.com/gongwuyuan/2555187.html

最新回复(0)