Category Archives: Implementation

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 … Continue reading

Posted in Implementation | Comments Off on Heap-sort implementation

Quick-select implementation

This is an implementation of the quick-select algorithm in C++. The source code can be found and executed at http://ideone.com/I8rRVd. Below are the comparison of two strategies for selecting the pivot point. First, when the last element of the sub-array is … Continue reading

Posted in Implementation | Comments Off on Quick-select implementation