Created MaxHeap and MinHeap classes.