Working MinHeap implementation