push BH corrigé
This commit is contained in:
parent
53eb7eaedf
commit
259d69c5c6
1 changed files with 2 additions and 1 deletions
|
@ -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.array.set(index, this.array.get(this.currentSize-1));
|
||||||
this.currentSize--;
|
this.currentSize--;
|
||||||
this.percolateDown(index);
|
this.percolateDown(index);
|
||||||
}
|
this.percolateUp(index);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public E findMin() throws EmptyPriorityQueueException {
|
public E findMin() throws EmptyPriorityQueueException {
|
||||||
|
|
Loading…
Reference in a new issue