Practice for implementing a priority queue using a max-heap. Plus, two additional functions for sorting a heap and checking if a heap is sorted.