On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> If you expect your data to be pretty nearly sorted
> already, but you just want to make sure (e.g. because a small number of
> elements may have been inserted or removed since the last sort),
> bubble-sort is a good choice.

But if you're at that stage you probably were doing something wrong in
the first place.

For a list of any decent size a few insertions using a bisection
algorithm will take fewer comparisons than a single bubblesort pass.


Carl Banks
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to