The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+12 votes
1.6k views

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

  1. Merge sort

  2. Bubble sort

  3. Quick sort

  4. Selection sort

asked in Algorithms by Veteran (52k points) | 1.6k views

3 Answers

+19 votes
Best answer

A.

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

answered by Boss (19.9k points)
edited by
+7 votes
Merge sort has lowest worst case time complexity i.e O(nlogn)
answered by Boss (14.4k points)
edited by
+4 votes
MERGE SORT all others have the worst case complexity O(n^2)
answered by (205 points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,536 questions
54,113 answers
187,308 comments
71,027 users