algorithm heap sort kata 3