edited by
731 views
0 votes
0 votes

edited by

1 Answer

0 votes
0 votes

Option A) is the ans

Insertion sort , is having minimum space requirements

Insertion sort is faster for small n because Quick Sort has extra overhead from the recursive function calls. Insertion sort is also more stable than Quick sort and requires less memory.

insertion sort is often used as the recursive base case (when the problem size is small).

  • Insertion sortinserts the next element at the correct position;

  • Selection sortselects the smallest element and exchange it with the current item

(Insertion sort) In-place, i.e., only requires a constant amount O(1) of additional memory space

Source: http://cheetahonfire.blogspot.com/2009/05/selection-sort-vs-insertion-sort.html

Related questions

2 votes
2 votes
1 answer
1
smsubham asked Jan 6, 2018
1,004 views
4 votes
4 votes
4 answers
2
Aibi asked Oct 8, 2017
2,626 views
Consider bottom-up merge sort working on 'n' elements. Assume 'n' is a power of 2. The minimum number of comparisons in order to get sorted list is(A) (n log n) / 2(B) n ...
0 votes
0 votes
1 answer
3
Ayush Upadhyaya asked Mar 8, 2017
631 views
The tightest lower bound on the number of comparisons, in worst case for comparison based sorting is of the order of ?(A)$n$(B)$n^2$(C)$nlogn$(D)$n \space{log\space n}^2$...