+ 1

Merge and sort

i tried to merge and sort an array which i had gotten with user input but the sort function is not working, i tried same thing with normal specified array, it worked fine...what am i doing wrong?

19th Nov 2018, 1:52 PM
Asaølu Elïjah
Asaølu Elïjah - avatar
3 odpowiedzi
+ 4
Really diffult answer with no code or no deeper specifications. Probably is a error in logic. I will give you a tip. In beggining when i was studying and implementing sorting algorithms, i always hit the correct answer for specified input. But when the input was random mostly of times i saw that i implemented the algorithm in a wrongly way. Try to not think in a specific input. You can make mistakes triyng to make work for only one, two, ...., inputs. Edit: plis with you gonna post the code. Store in codeplayground and share the link
19th Nov 2018, 2:52 PM
Anya
Anya - avatar
+ 1
Here is the code bro..i will be glad if you can help https://code.sololearn.com/WHbzaG31XMFR/?ref=app
19th Nov 2018, 2:58 PM
Asaølu Elïjah
Asaølu Elïjah - avatar
+ 1
Ok seens you are catenating the hole array like is one element. Try to concat element by element.
19th Nov 2018, 5:32 PM
Anya
Anya - avatar