Heap-sort implementation

An implementation of heap-sort is available for try at http://ideone.com/3tZslM. The output of the program is the following:

Success time: 0.43 memory: 7200 signal:0

Sorting       10 elements in       28 swaps
Sorting      100 elements in      576 swaps
Sorting     1000 elements in     9071 swaps
Sorting    10000 elements in   124213 swaps
Sorting   100000 elements in  1574718 swaps
Sorting  1000000 elements in 19044820 swaps

 

This entry was posted in Implementation. Bookmark the permalink.