| 21. | :: : Even the ultra-crappy bubble sort is O ( n ) in the best case.
|
| 22. | :: : : Bubble sort may be nice for educational purposes, but other simple algorithms perform better.
|
| 23. | Bubble sort and insertion sort can be interpreted as particular instances of this procedure to put a sequence into order.
|
| 24. | :: : : : I'd avoid using a bubble sort for sorting anything more than a dozen items.
|
| 25. | :: Bubble sort is easier for beginner programmers to write and isn't necessarily bad if the sets are small.
|
| 26. | Bubble sort can be used to sort a small number of items ( where its asymptotic inefficiency is not a high penalty ).
|
| 27. | Reading up on computer sorting algorithms ( bubble sort is pretty inefficient ) would take hours off the time taken to do the job.
|
| 28. | For example, writing a bubble sort is nice and quick, so they might do that rather than find a more efficient method.
|
| 29. | If I've already taught arrays, I use bubble sort to show how for loops work when I get to that topic.
|
| 30. | By shortening the part of the list that is sorted each time, the number of operations can be halved ( see bubble sort ).
|