search
Log In
1 vote
5.2k views

If the number of records to be sorted is small, then ...... sorting can be efficient.
A. Merge

B. Heap

C. Insertion

D. Bubble

in Algorithms 5.2k views
0
i think insertion sort
0
Ya, its right, can you explain why? how does size matter which sorting?

1 Answer

5 votes
 
Best answer

Insertion Sort

The constants in the time function in insertion sort is small. When the input size is small ,other algos prove to take greater time .

but when input is large enough nlogn algos are efficient.


selected by
0
can you give the constants in case of insertion and merge sort?

Related questions

2 votes
1 answer
2
2.4k views
Which of the following sorting methods will be the best if number of swapping done is the only measure of efficiency I am getting Bubble sort , is it right ?
asked Oct 8, 2015 in Algorithms worst_engineer 2.4k views
6 votes
2 answers
3
3.5k views
(A) Insertion Sort with time complexity O(kn) (B) Heap Sort with time complexity O(nLogk) (C) Quick Sort with time complexity O(kLogk) (D) Merge Sort with time complexity O(kLogk) what is the approach of doing this question ?
asked Jul 19, 2015 in Algorithms radha gogia 3.5k views
0 votes
3 answers
4
3.5k views
Which sorting algorithm can be used to sort a random linked list with minimum time complexity ? A)mergesort B)quicksort C)radixsort D)insertionsort E)heapsort
asked Apr 23, 2017 in Algorithms Angkit 3.5k views
...