+ 1
why this code is not working (bubble sort using class)
5 Respuestas
+ 1
In inner for loop, it should be j<(n-i-1)
+ 2
Yup, working for me too. No errors found when ran your code.
+ 1
for input 9 to 1 it gives output 1023456789
+ 1
Start your loop by 1 not by 0.. nd see the magic 😏
https://code.sololearn.com/c6985EEgt4Gj/?ref=app
0
Where do you find the error or for what inputs it doesn't work?
I ran it once and it worked.