@@ -144,7 +144,8 @@ public class BinaryHeap<E extends Comparable<E>> implements PriorityQueue<E> {
this.array.set(index, this.array.get(this.currentSize-1));
this.currentSize--;
this.percolateDown(index);
- }
+ this.percolateUp(index);
+ }
@Override
public E findMin() throws EmptyPriorityQueueException {