Heap sort in both C++ and in Go.