Add heap sort implementation

It is unnecessary to cast count as int, since we know that `count >= 2`