From a874222ca5aaf846c720ce0ba26b0a3ad51f07cc Mon Sep 17 00:00:00 2001 From: Sana Akbani <86171834+sanaakbani@users.noreply.github.com> Date: Wed, 12 Jan 2022 22:00:46 -0600 Subject: [PATCH] Adding object of type T to ArrayList --- .../algorithms/datastructures/priorityqueue/BinaryHeap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java b/src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java index 9d6789d1b..fca566fe2 100644 --- a/src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java +++ b/src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java @@ -21,7 +21,7 @@ public BinaryHeap() { // Construct a priority queue with an initial capacity public BinaryHeap(int sz) { - heap = new ArrayList<>(sz); + heap = new ArrayList(sz); } // Construct a priority queue using heapify in O(n) time, a great explanation can be found at: