+ 1

What is wrong in this code, some numbers arw sorted some are not.

https://code.sololearn.com/cuv2PwqbYI0n/?ref=app

14th Jun 2019, 8:41 AM
Shreyans
4 Respostas
+ 3
your code is running fine you can also use alternative way for shorter code Shreyans here is your update code https://code.sololearn.com/cXO5k4QUjgl6/?ref=app
14th Jun 2019, 8:46 AM
MsJ
MsJ - avatar
+ 3
Mohit the coder (M.S.D) I don't want a new code want to understand what's wrong in this code https://code.sololearn.com/cuv2PwqbYI0n/?ref=app
14th Jun 2019, 8:51 AM
Shreyans
+ 3
Shreyans your code is running fine on every input, are you giving input in correct manner as sololearn compiler like I give 6 1 3 2 4 6 5 and it's give sorted result 1,2,3,4,5,6
14th Jun 2019, 8:54 AM
MsJ
MsJ - avatar
+ 3
Mohit the coder (M.S.D) Give input as 9 23 45 21 43 76 23 54 78 97
14th Jun 2019, 9:00 AM
Shreyans