Switched HeapSort to use a reverse for loop since it is more readable.