You are viewing a single comment's thread. Return to all comments →
I had the same issue until I change the print lines to:
print("Array is sorted in %d swaps." % count) print("First Element: %d" % a[0]) print("Last Element: %d" % a[-1])
This was for Python3 but I think you can try something similar.
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 had the same issue until I change the print lines to:
This was for Python3 but I think you can try something similar.