mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
Remove unnecessary code (#4141)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user