We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I did basically the same algo. I don't understand how some solutions seem to just be doing a single loop without being wrapped in a while True, that wouldn't result in a sorted list for many situations, like if the lowest number is last in the list. Maybe I am missing something.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sorting: Bubble Sort
You are viewing a single comment's thread. Return to all comments →
I did basically the same algo. I don't understand how some solutions seem to just be doing a single loop without being wrapped in a while True, that wouldn't result in a sorted list for many situations, like if the lowest number is last in the list. Maybe I am missing something.