Click here to Skip to main content
13,055,754 members (48,934 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted 3 Nov 2012

Bubble sort modifications

, 3 Nov 2012
To handle the "no swap" situation, here is my proposal: When entering the outer loop, save the value of i in a temporary variable and set i to length - 1 (this value will cause an exit at the next iteration). And in the body of the if test (i.e. when a swap is made), restore the value of...

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 3-Nov-12 13:07 Available YvesDaoust
Updates in content. 4 changes had been made.
1 No 3-Nov-12 13:05 Available YvesDaoust

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

YvesDaoust
CEO VISION fOr VISION
Belgium Belgium
I fell into applied algorithmics at the age of 16 or so. This eventually brought me to develop machine vision software as a professional. This is Dreamland for algorithm lovers.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 3 Nov 2012
Article Copyright 2012 by YvesDaoust
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid