edited by
579 views
2 votes
2 votes

I don't find any option to be correct: Argument (a check for option B): For a straight merge sort, it is not possible to sort directly 2 halves. In a two way merge sort. say if items are greater than 8, then in just two calls, it is not possible to sort two halves.

Answer is given as B. Any suggestions? 

edited by

2 Answers

2 votes
2 votes
Merge sort uses divide and conquer so on array is divided into two parts in such a way that we recursively apply merger sort in two halves.

Once both halves are sorted then we compare and copy and merge them to form a single sorted array.

answer should be (B)
0 votes
0 votes
ans is B because it get divide into two equal parts every time and after that arrange themselves after every partition

a. is right if we think within a particular array whuch get partition every time

because her after partion it will be arrange i some specific order either incresing or decresing .

But at the other side if we compare the whole array there will be no formation of heap because as we see whole there is no

ordering i.e. incresing or decresing

c.is wrong because it depend on input given

d.it is definitely false

as above mentioned

Related questions

4 votes
4 votes
4 answers
1
Aibi asked Oct 8, 2017
2,585 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 ...
1 votes
1 votes
2 answers
2
Na462 asked Jun 29, 2018
527 views