The Gateway to Computer Science Excellence
0 votes
148 views
Which of the following sorting techniques have best time complexity, if complexity is measured in terms of number of comparison?

 

A Insertion sort

B Selection sort

C Merge sort

D QuickSort
in Algorithms by Boss (25.2k points)
edited by | 148 views

2 Answers

0 votes
In best case input, insertion sort.

In worst case input, merge sort.
by Active (3.2k points)
0
Please give one best  answer as per option
+1
One answer could be merge sort.
0 votes

In worst case input merge sort is better.

by Boss (35.3k points)
0
the question is given to measure time complexity on the basis of no of comparisons not the asymptotic meaning
0
Time complexities can be obtained based on number of comparisons.

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
50,654 questions
56,169 answers
193,881 comments
94,303 users