MaxHeap Solution