First time here? Checkout the FAQ!
+1 vote

Choose the correct alternatives (More than one may be correct).

The complexity of comparision based sorting algorithms is:

  1. $\Theta (n \log n)$
  2. $\Theta (n)$
  3. $\Theta \left(n^2\right)$
  4. $\Theta (n\sqrt n)$
asked in Algorithms by Veteran (29.1k points)   | 76 views

1 Answer

0 votes

Only A & C are possible in Comparision based sorting   

Algorithm Time Complexity
  Average Worst
Quicksort O(n log(n)) O(n^2)
Mergesort O(n log(n)) O(n log(n))
Heapsort O(n log(n)) O(n log(n))
Bubble Sort O(n^2) O(n^2)
Insertion Sort O(n^2) O(n^2)
Select Sort O(n^2) O(n^2)
answered by Veteran (11.4k points)  
edited by
When question says "The complexity of comparision based sorting algorithms" we should consider all comparison based algorithms together and not separately. So, answer must be A and C is false.

@Arjun sir Isn't the question is asking what are the complexities possible in comparision based sorting

Just option A is Θ(nlogn) whereas for selection sort and bubble sort Θ(n2)

So we should consider both 

Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2608 Points

  5. Debashish Deka

    2104 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1336 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1186 Points

  10. Sanjay Sharma

    1016 Points

Monthly Topper: Rs. 500 gift card

21,446 questions
26,757 answers
22,954 users