16,161 views
33 33 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
41 41 votes

Correct Option: A

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

edited by
1 1 vote
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:
Position:
Show:

Related questions

8 8 votes
6 6 answers
3.8k
3.8k views
Arjun asked Feb 27, 2025
3,799 views
Suppose that insertion sort is applied to the array $[1,3,5,7,9,11, x, 15,13]$ and it takes exactly two swaps to sort the array. Select all possible values of $x$.$10$$12...
93 93 votes
11 answers 11 answers
44.7k
44.7k views
Kathleen asked Sep 21, 2014
44,692 views
An array of $n$ numbers is given, where $n$ is an even number. The maximum as well as the minimum of these $n$ numbers needs to be determined. Which of the following is T...
30 30 votes
7 answers 7 answers
13.0k
13.0k views
pC asked Dec 21, 2015
12,951 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$...
50 50 votes
5 answers 5 answers
26.4k
26.4k views
Kathleen asked Sep 21, 2014
26,446 views
In an unweighted, undirected connected graph, the shortest path from a node $S$ to every other node is computed most efficiently, in terms of time complexity, byDijkstra’...