in Algorithms edited by
1,037 views
0 votes
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 edited by
1.0k views

1 comment

It depends on lot of factors.

1. Size of input. => Quick sort
2. How well is it sorted. => Insertion sort
3. Can your system allot more space for sorting to function. => Merge sort

i think question is incomplete,
0
0

2 Answers

0 votes
0 votes
In best case input, insertion sort.

In worst case input, merge sort.

2 Comments

Please give one best  answer as per option
0
0
One answer could be merge sort.
1
1
0 votes
0 votes

In worst case input merge sort is better.

2 Comments

the question is given to measure time complexity on the basis of no of comparisons not the asymptotic meaning
0
0
Time complexities can be obtained based on number of comparisons.
0
0

Related questions