The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+11 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

asked in Algorithms by Veteran (69k points) | 1.1k views

3 Answers

+17 votes
Best answer


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

answered by Veteran (19.8k points)
edited by
+7 votes
Merge sort has lowest worst case time complexity i.e O(nlogn)
answered by Veteran (14.3k points)
edited by
+4 votes
MERGE SORT all others have the worst case complexity O(n^2)
answered by (223 points)

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

33,687 questions
40,230 answers
38,791 users