757 views
4 votes
4 votes
When an array is to be sorted, It may happen that some data values start out being in the same position where they should end up. For example in the array which is originally {40, -1, 33, 0} 33 is right where it will be in the final sorted output: {-1, 0, 33, 40} But as a particular sorting algorithm operates, it might (depending on the algorithm) move such an element out of the position where it belongs (of course, it will eventually get moved back) which of the following statements are true:
i. Merge Sort never (even temporarily) moves such an element
ii. Quick Sort never (even temporarily) moves such an element
iii. Selection Sort never (even temporarily) moves such an element

(a) ii only  (b) i & iii  (c) i & ii      (d) ii & iii

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
1
radha gogia asked Jul 16, 2015
832 views
I am not getting which algorithm has minimum no of swap operations , acc to me both selection and insertion should be at the lowest level as well as merge sort since afte...
1 votes
1 votes
1 answer
2
iarnav asked May 4, 2019
847 views
I’ve seen this wikipedia article – https://en.wikipedia.org/wiki/Comparison_sortAlso see this link – https://gateoverflow.in/32948/minimum-number-of-comparisonshttp...
9 votes
9 votes
2 answers
3
srestha asked Dec 23, 2016
3,538 views
The lower bound on the no. of comparisons required to sort n numbers is __________ ?
3 votes
3 votes
3 answers
4
sunil sarode asked Jan 23, 2018
2,954 views
I am not able to get this formula (number of input * number of digit *base of number )I am not getting how base of number is important ?Thanks :)