471 views

Which of the following is not true about comparison based sorting algorithms?
(A) The minimum possible time complexity of a comparison based sorting algorithm is O(nLogn) for a random input array
(B) Any comparison based sorting algorithm can be made stable by using position as a criteria when two elements are compared
(C) Counting Sort is not a comparison based sorting algortihm
(D) Heap Sort is not a comparison based sorting algorithm.

closed with the note: I got the answer, i misunderstood the question wrongly.

closed | 471 views
0

According to geeks for geeks the answer is (D). But everywhere i saw that the counting sort is not a comparision based sorting algorithm.

As per Wikipedia: Counting sort uses key values as indexes into an array, it is not a comparison sort

0

Sumit Singh Chauhan you are right  Counting sort uses key values as indexes into an array, it is not a comparison sort , In above question Which of the following is not true about comparison based sorting algorithms? so, option c is true, answer should be D

0
Oh Yeah, What a silly mistake i did.
0
Anyway thanks for noticing
0

it happens, By the way when i show this question, i thought you are asking about option A

have you got option A right

0
Yes, I am ok with rest all of the options.
0

https://gateoverflow.in/234708/geeks-doubt

0
sure
0
I have a doubt, A is true just bcoz "the random input array" is given ? Bcoz we know that the best case time complexity is O(n) . please clearify