The Gateway to Computer Science Excellence
0 votes
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)
Please give one best  answer as per option
One answer could be merge sort.
0 votes

In worst case input merge sort is better.

by Boss (35.3k points)
the question is given to measure time complexity on the basis of no of comparisons not the asymptotic meaning
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
94,303 users