# Heapsort

Heap sort? What? You choose this?
I don’t know why I choose heapsort. Maybe I just want to practise how to write something about heap.
If you want to know how it works, go to Wiki, or Baidu, or Google.
It’s just my implement.
We can see that heapsort may have more actions compared with quicksort. But heapsort is always $O(n * log_2n)$, while quicksort may cause a $O(n^2)$. Especially I’m always in bad luck. T.T
Here is my code:

Contents