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.currentSize--;
|
||||
this.percolateDown(index);
|
||||
}
|
||||
this.percolateUp(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public E findMin() throws EmptyPriorityQueueException {
|
||||
|
|
Loading…
Reference in a new issue