diff --git a/src/com/jwetherell/algorithms/data_structures/BinaryHeap.java b/src/com/jwetherell/algorithms/data_structures/BinaryHeap.java index 81932349..701d5558 100644 --- a/src/com/jwetherell/algorithms/data_structures/BinaryHeap.java +++ b/src/com/jwetherell/algorithms/data_structures/BinaryHeap.java @@ -262,6 +262,7 @@ private void shrink() { @Override public void clear() { size = 0; + this.array[0] = null; } /**