【单选题】【消耗次数:1】
排序算法中,从尚未排序序列中依次取出元素与已排序序列(初始为空)中的元素进行比较(要求比较次数尽量少),然后将其放入已排序序列的正确位置的方法是( )。
A.折半插入排序
B.直接插入排序
C.归并排序
D.选择排序
参考答案:
复制
纠错
相关题目
【单选题】 排序算法中,从尚未排序序列中依次取出元素与已排序序列(初始为空)中的元素进行比较,然后将其放入已排序序列的正确位置的方法是( )。
①  A.冒泡排序
②  B.直接插入排序
③  C.归并排序
④  D.选择排序
【判断题】 排序算法中,从未排序序列中依次取出元素与已排序序列(初始为空)中的元素进行比较(要求比较次数尽量少),然后将其放入已排序序列的正确位置的方法是折半插入。
①  正确
②  错误
【单选题】 排序方法中,从未排序序列中挑选元素,并将其依次放入已排序序列(初始为空)的一端的方法,称为( )排序。
①  A.堆
②  B.冒泡
③  C.选择
④  D.快速
【判断题】 排序方法中,从未排序序列中挑选元素,并将其依次放入已排序序列(初始为空)的一端的方法,称为选择排序。
①  正确
②  错误
【单选题】 就排序算法所用的辅助空间而言,堆排序、快速排序、归并排序的关系是( )。
①  A.堆排序 快速排序 归并排序
②  B.堆排序 归并排序 快速排序
③  C.堆排序 归并排序 快速排序
④  D.堆排序 快速排序 归并排序
【单选题】 对n个元素进行直接插入排序时间复杂度为( )。
①  O(1)
②  O(n)
③  n+1
④  n/2
【单选题】 若对n个元素进行直接插入排序,在进行第i趟排序时,假定元素r[i+1]的插入位置为r[j],则需要移动元素的次数为( )。
①  j-i
②  i-j-1
③  i-j
④  i-j+1
【单选题】 若待排序序列在排序前已按关键字递增排列,则采用( )方法比较次数最多。
①  A.直接插入排序
②  B.归并排序
③  C.归并排序
④  D.直接选择排序
【单选题】 在对n个元素进行直接插入排序的过程中,算法的空间复杂度为( )。
①  O(1)
②  O(log2(n))
③  O(n的平方)
④  O(nlog2(n))
【单选题】 在对n个元素进行直接插入排序的过程中,共需要进行( )趟。
①  n
②  n+1
③  n-1
④  2n
随机题目
【单选题】 By the end of next month he ____ everything in school.
①  will finish
②  will have finished
③  finishes
④  would finished
【单选题】 Even great musicians require ____ practice.
①  convenient
②  continual
③  continuous
④  contrary
【单选题】 Wealthy ____ he was, the governor would not spend a penny on such things.
①  as
②  if
③  though
④  however
【单选题】 —Guest: Oh, it’s ten o’clock. I’d better go now.—Host: ____.
①  OK. Please walk slowly and take care.
②  Why do you want to go now? Don’t you want to stay?
③  Yeah, it’s really late. Why not immediately?
④  Won’t you stay for another cup of coffee?
【单选题】 Youhavetopaytohavethebooksprinted, ____ canbequiteexpensive.
①  which
②  it C. that D. this
③  that
④  this
【单选题】 Early to bed and early to rise ____ a man healthy, wealthy and wise. ?
①  make ?
②  had made ?
③  makes ?
④  will make?
【单选题】 People often ____ the old days ____good times, and seem to forget the hardship they suffered.
①  hold--back
②  associate--with
③  put--down
④  turn--out
【单选题】 This is the ____ photo I have ever taken.
①  worse
②  better
③  best
④  most worst
【单选题】 ____ these honors he received a sum of money.
①  Except
②  But
③  Besides
④  Outside
【单选题】 Before taking off, they were asked to ____ their seat-belts.
①  fast
②  wide
③  focus
④  fasten