|
|
C++ Programming |
|
|
Bubble SortThe bubble sort is one of the simplest sorting algorithms, but not one of the most efficient. It puts a list into increasing order by successively comparing adjacent elements, interchanging them if they are in the wrong order. Complexity The bubble sort uses (n-1)n/2 comparisons, so it has (-) (n2) worst-case complexity in terms of the number of comparisons used.
Algorithm Source Code
#include <iostream.h>
DISCLAIMER
|
|
Home Disclaimer Advertise Contact us Copyright © 2006-08 Paked.com. All rights reserved. Note: Site best viewed at 1024 x 768 or higher screen resolution
|
|
|
|
|