Rewrite MinHeap.java