10,882 views
24 votes
24 votes

Which of the following sorting algorithms has the lowest worse-case complexity?

  1. Merge sort

  2. Bubble sort

  3. Quick sort

  4. Selection sort

4 Answers

Best answer
29 votes
29 votes

Correct Option: A

Irrespective of the input, merge sort always have a time complexity of  $\Theta(n \log n)$.

edited by
4 votes
4 votes
MERGE SORT all others have the worst case complexity O(n^2)
0 votes
0 votes
Irrespective of everything worst case for quick sort,bubble srt and selections sort  is  O(n^2)

 

Whereas for merge sort it is O(nlog n)
Answer:

Related questions

21 votes
21 votes
7 answers
2
pC asked Dec 21, 2015
7,900 views
Consider the DAG with $V = \{1,2,3,4,5,6\}$ shown below.Which of the following is not a topological ordering?$1$ $2$ $3$ $4$ $5$ $6$$1$ $3$ $2$ $4$ $5$ $6$$1$ $3$ $2$ $4$...
36 votes
36 votes
5 answers
3
43 votes
43 votes
4 answers
4
Kathleen asked Sep 14, 2014
13,688 views
Randomized quicksort is an extension of quicksort where the pivot is chosen randomly. What is the worst case complexity of sorting n numbers using Randomized quicksort?$O...