0
[solved] Not able to find issue in merge sort
Hi I tried checking with printing values on my merge sort implementation as below: Could not find what issue it has. Can anyone pin point issue ? I feel that when 9 and 3 is passed as merge function, it does not swap but I am missing what issue is. Sorry for this question but I could not get answer by debugging almost for 1 hour. https://code.sololearn.com/chjg0iDszBk4/?ref=app
2 odpowiedzi
+ 2
A very little mistake in merge function you should initialize k with l
k=l;
Cause we are running merger from l to r so it should be start from l
0
Thank you so much