Remove unnecessary code (#4141)

This commit is contained in:
Saurabh Rahate
2023-04-03 20:05:59 +05:30
committed by GitHub
parent 805f09850c
commit ad72c28d91
64 changed files with 125 additions and 322 deletions

View File

@@ -234,7 +234,6 @@ public class FibonacciHeap {
if (!curr.isMarked()) { //stop the recursion
curr.mark();
if (!curr.isRoot()) this.markedHeapNoodesCounter++;
return;
} else {
if (curr.isRoot()) {
return;

View File

@@ -51,18 +51,12 @@ public class MinPriorityQueue {
// returns boolean value whether the heap is empty or not
public boolean isEmpty() {
if (0 == this.size) {
return true;
}
return false;
return 0 == this.size;
}
// returns boolean value whether the heap is full or not
public boolean isFull() {
if (this.size == this.capacity) {
return true;
}
return false;
return this.size == this.capacity;
}
// prints the heap