采用初始增量为4的希尔排序法,对没有关键码序列{15, 10,4,26,14,2,13,19,17,59,23}按照关键码值

14 查阅

采用初始增量为4的希尔排序法,对没有关键码序列{15, 10,4,26,14,2,13,19,17,59,23}按照关键码值递增的次序排序,一趟扫描后的结果为( )。A.{14,2,4,19,15,10,13,26,17,59,23}B.{2,9,4,26,14,15,13,19,17,5,9,23}C.{10,4,15,14,2,13,19,16,5,9,23,26}D.{10,15,4,2,14,13,19,16,5,9,23,26}

参考答案:

A首先按增量为4进行分组,15,14,17;10,2,59; 4,13,23; 26; 然后将每组进行递增排序,14,15,17;2,10,59;4,13,23;26;再插入原来的位置

计算机三级