adplus-dvertising
frame-decoration

Question

The worst case of quick sort has order

a.

O(n^2 )

b.

O(n)

c.

O (n log2 n)

d.

O (log2 n)

Answer: (a).O(n^2 )

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The worst case of quick sort has order

Similar Questions

Discover Related MCQs

Q. Which technique is suitable for performing a search in a small array or in an unsorted array?

Q. What finds the largest element in the array, and puts it in the proper place?

Q. Which array is the fastest on an average, but sometimes unbalanced partitions can lead to very slow sorting?

Q. In computer science, what is of immense importance and is one of the most extensively researched subjects?

Q. It is estimated that around __________ of all CPU cycles are used to sort data?

Q. In which field, a sorting algorithm refers to an algorithm the function of which is to put elements of a list in a certain order?

Q. Which of the following statements is correct?

(i) Sorting is also often used to produce human-readable output.
(ii) The output should not be a permutation or reordering of the input.

Q. The analysis of bubble sort was done as early as_____________.

Q. ___________ is a method of arranging keys in a file in the ascending or descending order.

Q. Library sort was first published in___________.

Q. Sorting makes handling of ______ in a file easier.

Q. What refers to a simple sorting algorithm?

Q. _________is efficient for data sets which are already substantially sorted. The time complexity is O(n + d), where d is the number of inversions.

Q. Compared to insertion sort, _________ are more advanced algorithms.

Q. In abstract terms, each iteration of insertion sort removes an element from the input data and
then inserts it into the correct position in the _________ that is already sorted.

Q. An array sorted in the reverse order is the __________ case input.

Q. ___________ is a simple sorting technique to sort a list of elements.

Q. The running time of heap sort is __________.

Q. There is one to one correspondence between elements of the _________of the tree.

Q. To perform the heap sort, you need to create a tree with all nodes greater than their __________.