+ 1
I'm not getting sorted array ?????
i use merge sort algo to sort my array but there is something wrong which i have written pls help me to find out đ Check my attempt here đ https://code.sololearn.com/c7uz9habOz21/?ref=app
2 Answers
+ 1
Jayakrishnađźđł it took me long time to find a problem in this code. finally resolved it. Thanks you
0
In the first for loop of mergesort() method, use array "a", not b.
And in merge() method, use index as k => c[k] for all "c" Array instances...