The Gateway to Computer Science Excellence
0 votes
180 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.6k points)
edited by | 180 views

2 Answers

0 votes
In best case input, insertion sort.

In worst case input, merge sort.
by Active (3.4k 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 (36.9k 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,833 questions
57,748 answers
199,477 comments
108,123 users