Browse Source

push BH corrigé

Favary Pierre 7 months ago
parent
commit
259d69c5c6

+ 2
- 1
be-graphes-algos/src/main/java/org/insa/graphs/algorithm/utils/BinaryHeap.java View File

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

Loading…
Cancel
Save