Sorting MCQ

21. What is the average case complexity of bubble sort?

A. O(nlogn)
B. O(logn)
C. O(n)
D. O(n2)

View Answer


22. The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How many iterations will be done to sort the array?

A. 4
B. 2
C. 1
D. 0

View Answer


23.What is the best case efficiency of bubble sort in the improvised version?

A. O(nlogn)
B. O(logn)
C. O(n)
D. O(n2)

View Answer


24. QuickSort can be categorized into which of the following?

A. Brute Force technique
B. Divide and conquer
C. Greedy algorithm
D. Dynamic programming

View Answer


25. What is a randomized QuickSort?

A. The leftmost element is chosen as the pivot
B. The rightmost element is chosen as the pivot
C. Any element in the array is chosen as the pivot
D. A random number is generated which is used as the pivot

View Answer






Also Check :


Discussion


* You must be logged in to add comment.