What is the worst case time complexity of bucket sort (k = number of buckets)?
A. O(n + k)
B. O(n.k)
C. O(n2 )
D. O(n log n)
Select an option to see the answer and solution.
Shell sort is an improvement on . . . . . . . .
A. insertion sort
B. selection sort
C. binary tree sort
D. quick sort
Select an option to see the answer and solution.
What is the worst case time complexity of tree sort (when implemented with an unbalanced tree)?
A. O(n)
B. O(n log n)
C. O(n2 )
D. O(log n)
Select an option to see the answer and solution.
Which of the following algorithm takes non linear time for sorting?
A. counting sort
B. quick sort
C. bucket sort
D. radix sort
Select an option to see the answer and solution.
Odd-even sort is a comparison based sort.
Select an option to see the answer and solution.
Which of the following is good for sorting arrays having less than 100 elements?
A. Quick Sort
B. Selection Sort
C. Merge Sort
D. Insertion Sort
Select an option to see the answer and solution.
Which of the following sorting techniques is most efficient if the range of input data is not significantly greater than a number of elements to be sorted?
A. selection sort
B. bubble sort
C. counting sort
D. insertion sort
Select an option to see the answer and solution.
Quick sort is a space-optimised version of . . . . . . . .
A. Bubble sort
B. Selection sort
C. Insertion sort
D. Binary tree sort
Select an option to see the answer and solution.
What is the average time complexity of MSD radix sort (w= bits required to store each key)?
A. O(n + w)
B. O(n.w)
C. O(n2 )
D. O(n log n)
Select an option to see the answer and solution.
What is the average time complexity of stooge sort?
A. O(n2 )
B. O(n3 )
C. O(n2.6 )
D. O(n2.7 )
Select an option to see the answer and solution.
Which of the following sorting algorithm has the same time complexity in every case?
A. stooge sort
B. strand sort
C. quick sort
D. bubble sort
Select an option to see the answer and solution.
What is the average case time complexity of bogosort?
A. O(n2 )
B. O(n*n!)
C. O(infinity)
D. O(n log n)
Select an option to see the answer and solution.
Which of the following algorithm takes linear time for sorting?
A. pigeonhole sort
B. heap sort
C. comb sort
D. cycle sort
Select an option to see the answer and solution.
What is the cut-off for switching from quick sort to heap sort in the implementation of introsort?
A. 16
B. n2
C. n log(n)
D. 2 log (n)
Select an option to see the answer and solution.
What is the auxiliary space complexity of recursive insertion sort?
A. O(n)
B. O(1)
C. O(n log n)
D. O(n2 )
Select an option to see the answer and solution.
What is the average case time complexity of gnome sort?
A. O(n)
B. O(n2 )
C. O(n log n)
D. O(log n)
Select an option to see the answer and solution.
What is the disadvantage of counting sort?
A. counting sort has large time complexity
B. counting sort has large space complexity
C. counting sort is not a comparison based sorting technique
D. counting sort cannot be used for array with non integer elements
Select an option to see the answer and solution.
Auxiliary space used by gnome sort is . . . . . . . .
A. O(1)
B. O(n)
C. O(log n)
D. O(n log n)
Select an option to see the answer and solution.
What is the purpose of using randomized quick sort over standard quick sort?
A. so as to avoid worst case time complexity
B. so as to avoid worst case space complexity
C. to improve accuracy of output
D. to improve average case time complexity
Select an option to see the answer and solution.
What is the purpose of using a median of three quick sort over standard quick sort?
A. so as to avoid worst case time complexity
B. so as to avoid worst case space complexity
C. to improve accuracy of output
D. to improve average case time complexity
Select an option to see the answer and solution.