单项选择题

The sorting method described by the following code is called( ). FOR i:=1 TO n—1 do BEGIN k: =i; FOR j: =i+1 TO n DO IF A[j]<A[K] THEN k:=j; IF k<>i THEN BEGIN x:=A[k]; A[k]: = A[i]; A[i]:=x END END;

A.insertion sort
B.selection sort
C.radix sort
D.merge sort
<上一题 目录 下一题>
热门 试题

单项选择题
The figure below Shows a record used for recording information about a named event. Which of the following statement is incorrect ( ) VAR r: RECORD event: ARRAY[1.. 10] of Char; place: ARRAY[1.. 20] of RECORD plname: ARRAY[1.. 15]of Char; date: ARRAY[1.. 5] of RECORD mo: 1.. 12; day: 1..31; year: Integer END END END;
A.This is a one—dimensional array of records, also called a table
B.The event can occur in up to 20 places and on up to 5 different dates in each place
C.This is so called record of arrays
D.A reference to place, date, mo will access the month of the jth occurrence, in the ith place, of the event named in event
单项选择题
An algorithm to solve a given problem has time complexity T(n) = nlog2n-(n-1) Given that the algorithm takes 0.8 second for a problem in which n=1024, how long should it take for a problem in which n=4096 ( )
A.39 seconds
B.0.8 seconds
C.3.9 minutes
D.3.9 seconds
相关试题
  • 这些二叉排序树中有( )棵是最佳二叉排序树。
  • 散列表是一种重要的存储方式,在散列表里可...
  • 能构造出( )种不同的二叉排序树。
  • 要在n个居民点之间铺设煤气管道。工人们面...
  • A hash table with hash function is...