Heap sort works fine.

TODO: need for not integer-only sorting (template or passed comparable) +
    more flexible heapsort (min or max) invocation.