0

Why does my merge sort program giving me wrong answer on the following test cases?

https://code.sololearn.com/ca2599a11a8a/?ref=app This is a program where I used merge sort algorithm to sort by ascending order. And It's not working on these test cases. test case 1: Input: 17 167646397 489675191 751672031 662409180 738927669 85234562 561143079 996406708 13895700 849670627 182088302 664301775 533983234 635453088 879291989 391378449 70096426 Output: 13895700 70096426 85234562 167646397 182088302 391378449 489675191 533983234 561143079 635453088 662409180 664301775 738927669 751672031 849670627 879291989 996406708 Test Case 2: Input: 43 81170948 748105763 385107655 841409579 880357373 315531861 636610902 268189490 31141410 871085889 940943667 382933154 516230879 324343778 839749412 258542580 445112295 192562497 554815317 368857046 471474282 398588604 512083856 746099301 354191711 30157378 126177155 863200626 146480571 973389972 107650814 247771325 283751096 260900229 429396018 830409788 290135055 210428475 592867826 327242324 429286461 41244523 728176629

2nd Mar 2021, 2:36 AM
Samia Haque
Samia Haque - avatar
1 Respuesta
0
Try to solve it using C++
6th Mar 2021, 7:31 AM
ALI YAQOOB
ALI YAQOOB - avatar