Finished MaxHeap and a test for heap.