+ 1

What am I doing wrong in this bubble sorter?

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

7th Aug 2022, 5:16 PM
Nemanja Jović
Nemanja Jović - avatar
1 Answer
+ 3
You have moved your biggest value to the last place, but thats it. You could use 2 loops, 1 for the places you want to fill, and the other for the comparisons until the biggest of the remaining numbers have been sorted to the desired position
7th Aug 2022, 5:33 PM
YuGiMob
YuGiMob - avatar