(array)
| 390 | array.message("Sorted") |
| 391 | |
| 392 | def selectionsort(array): |
| 393 | size = array.getsize() |
| 394 | array.reset("Selection sort") |
| 395 | try: |
| 396 | for i in range(size): |
| 397 | array.show_partition(i, size) |
| 398 | for j in range(i+1, size): |
| 399 | if array.compare(i, j) > 0: |
| 400 | array.swap(i, j) |
| 401 | array.message("Sorted") |
| 402 | finally: |
| 403 | array.hide_partition() |
| 404 | |
| 405 | def bubblesort(array): |
| 406 | size = array.getsize() |
nothing calls this directly
no test coverage detected