Skip to content

Commit 1c3ebd0

Browse files
committed
Remove display
1 parent a028c35 commit 1c3ebd0

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/main/java/com/thealgorithms/datastructures/heaps/GenericHeap.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ private void upHeapify(int ci) {
4141
}
4242
}
4343

44-
/**
45-
* Displays the contents of the heap.
46-
*/
47-
public void display() {
48-
System.out.println(this.data);
49-
}
50-
5144
/**
5245
* Returns the number of elements in the heap.
5346
*

src/test/java/com/thealgorithms/datastructures/heaps/GenericHeapTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,4 @@ void testUpdatePriorityForNonExistentItem() {
8282
Exception exception = assertThrows(IllegalArgumentException.class, () -> heap.updatePriority(100));
8383
assertEquals("Item not found in the heap", exception.getMessage());
8484
}
85-
86-
@Test
87-
void testDisplay() {
88-
heap.add(10);
89-
heap.add(20);
90-
heap.add(5);
91-
heap.display(); // Just checking no exceptions are thrown.
92-
}
9385
}

0 commit comments

Comments
 (0)