Sorting-Algorithms (C++)

KTextEditor Snippets

Source (required if based on other people's work):

0
Score 65%
Description:

Some sorting algorithms written in C++.
Currently implemented:
-Bubble-Sort
-Select-Sort
-Insert-Sort
-Slow-Sort
-Intro-Sort (STL)
-Heap-Sort (STL)
There are also some utility snippets, to shake containers randomly, to dump a container to stderr (or whatever) and to fill containers from stdin (or whatever).
Last changelog:

8 years ago

1.1:
Slow-Sort
Short-Dump
Input

1.0:
Bubble-Sort
Select-Sort
Insert-Sort
Intro-Sort (STL)
Heap-Sort (STL)
Dump
Random-Shake

ashaduri

8 years ago

The container-dump snippet could use some std:: qualifiers.
Also, I think it's too long. Something like:
std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout, ", "));
would be a lot more compact and readable.

Report

C

TheUserK

8 years ago

I will add such a dump.
Thanks.

Report

8 years ago

1.1:
Slow-Sort
Short-Dump
Input

1.0:
Bubble-Sort
Select-Sort
Insert-Sort
Intro-Sort (STL)
Heap-Sort (STL)
Dump
Random-Shake

product-maker 6 16

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
1.1
updated Mar 16 2010
added Feb 27 2010
downloads today
0
page views today 0
System Tags addon