cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Bubble Sort/Selection Sort
Bubble Sort/Selection Sort
Apr 25, 2013 at 2:14am UTC
Stephaniei492
(79)
Bubble Sort/Selection Sort
Last edited on
Apr 26, 2013 at 9:21pm UTC
Apr 25, 2013 at 3:26am UTC
shacktar
(1187)
Selection sort is supposed to be slower than bubble sort
Well, not according to Wikipedia
http://en.wikipedia.org/wiki/Selection_sort
(Comparison to other sorting algorithms)
Among simple average-case Θ(n
2
) algorithms, selection sort almost always outperforms bubble sort and gnome sort...
Apr 25, 2013 at 3:50am UTC
Stephaniei492
(79)
So, then my program is functionally properly?
I get 0,0,0,1,6,13,22,91,363,1280 for selection sort.
I get 0,0,0,0,17,38,69,275,1098,3861 for bubble sort.
Does these numbers seem correct?
Apr 25, 2013 at 2:42pm UTC
shacktar
(1187)
Those look sorted to me :)
Topic archived. No new replies allowed.