retagged by
632 views
2 votes
2 votes
is there any swap operation done in merge sort?
retagged by

2 Answers

0 votes
0 votes
basically merge sort use 2 separate arrays for holding left and right subarrays at each level. we just compare the elements as per put them in to subarray in upper level. so here only comparision and movement is done while swapping take to locations to interchange their values

so merge sort does not have swap operation

Related questions

0 votes
0 votes
0 answers
1
Ujjal Das asked Mar 17
83 views
Calculate the minimum and maximum number of element comparisons involved in 2 way merge sort assuming n is power of 2.
0 votes
0 votes
0 answers
3
Nandkishor3939 asked Jan 21, 2019
679 views
What is the extra memory needed for merge sort:1] In case of Iterative merge sort.(DS:Array)2]In case of Recursive merge sort.(DS:Array)3] In case of Iterative merge sort...
0 votes
0 votes
0 answers
4
Vikas123 asked Jan 8, 2019
1,003 views
Can anyone help me to understand this problem….??