GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
142 views

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 (39.7k points) 255 1306 1936 | 142 views

1 Answer

+1 vote

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 (12.5k points) 10 47 90
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 



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
Top Users Oct 2017
  1. Arjun

    23338 Points

  2. Bikram

    17048 Points

  3. Habibkhan

    7912 Points

  4. srestha

    6228 Points

  5. Debashish Deka

    5438 Points

  6. jothee

    4968 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4286 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3794 Points


Recent Badges

Popular Question makhdoom ghaya
Popular Question junaid ahmad
Notable Question learner_geek
Notable Question jothee
Popular Question jothee
Notable Question Jeffrey Jose
Notable Question air1ankit
Nice Question jothee
Verified Human shaleen25
Popular Question jothee
27,290 questions
35,142 answers
83,920 comments
33,231 users