Bottom up and top down heap sort