41
What is the recurrence relation for stooge sort?
A)
T(n) = 2T(2/3n) + O(n)
B)
T(n) = 2T(2/3n) + O(1)
C)
T(n) = 3T(2/3n) + O(n)
D)
T(n) = 3T(2/3n) + O(1)
Answer & Solution
Answer: Option
D
42
Apply Quick sort on a given sequence 7 11 14 6 9 4 3 12. What is the sequence after first phase, pivot is first element?
A)
6 4 3 7 11 9 14 12
B)
6 3 4 7 9 14 11 12
C)
7 6 14 11 9 4 3 12
D)
7 6 4 3 9 14 11 12
Answer & Solution
Answer: Option
B
43
What is the average case time complexity of cycle sort?
A)
O(n2 )
B)
O(n log n)
C)
O(log n)
D)
O(n)
Answer & Solution
Answer: Option
A
44
Which of the following sorting algorithm is in-place?
A)
Merge sort
B)
Cycle sort
C)
Counting sort
D)
Radix sort
Answer & Solution
Answer: Option
B
45
What is the worst case time complexity of odd-even sort?
A)
O(n)
B)
O(n log n)
C)
O(n2 )
D)
O(log n)
Answer & Solution
Answer: Option
C
46
The worst case running time of shell sort, using Shell's increments is?
A)
O(N)
B)
O(N log N)
C)
O(log N)
D)
O(N2 )
Answer & Solution
Answer: Option
D
47
Which of the following sorting algorithms can be considered as improvement to the binary tree sort?
A)
Heap sort
B)
Quick sort
C)
Selection sort
D)
Insertion sort
Answer & Solution
Answer: Option
A
48
Which of the following options contain the correct feature of an insertion sort algorithm?
A)
anti-adaptive
B)
dependable
C)
stable, not in-place
D)
stable, adaptive
Answer & Solution
Answer: Option
D
49
What is the auxiliary space requirement of cycle sort?
A)
O(n)
B)
O(1)
C)
O(log n)
D)
O(n log n)
Answer & Solution
Answer: Option
B
50
Records R1, R2, R3,.. RN with keys K1, K2, K3,.. KN are said to be h-ordered, if . . . . . . . .
A)
Ki <= Ki+h for 1<= i*h <= N
B)
Kh <= Ki+h for 1<= i <= N
C)
Ki <= Kh for 1<= i <= h
D)
Ki <= Ki+h for 1<= i <= N-h
Answer & Solution
Answer: Option
D