diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml
index 0a535438..9a9712e0 100644
--- a/spotbugs-exclude.xml
+++ b/spotbugs-exclude.xml
@@ -132,9 +132,6 @@
-
-
-
diff --git a/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java b/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java
index 1575e364..95d53ecb 100644
--- a/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java
+++ b/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java
@@ -64,7 +64,7 @@ public class LargeTreeNode extends TreeNode {
*/
@Override
public boolean isLeafNode() {
- return (childNodes == null || childNodes.size() == 0);
+ return (childNodes == null || childNodes.isEmpty());
}
public Collection> getChildNodes() {
diff --git a/src/main/java/com/thealgorithms/searches/QuickSelect.java b/src/main/java/com/thealgorithms/searches/QuickSelect.java
index c89abb00..d5f69529 100644
--- a/src/main/java/com/thealgorithms/searches/QuickSelect.java
+++ b/src/main/java/com/thealgorithms/searches/QuickSelect.java
@@ -31,7 +31,7 @@ public final class QuickSelect {
public static > T select(List list, int n) {
Objects.requireNonNull(list, "The list of elements must not be null.");
- if (list.size() == 0) {
+ if (list.isEmpty()) {
String msg = "The list of elements must not be empty.";
throw new IllegalArgumentException(msg);
}
diff --git a/src/main/java/com/thealgorithms/sorts/MergeSortRecursive.java b/src/main/java/com/thealgorithms/sorts/MergeSortRecursive.java
index f67ba631..910157b8 100644
--- a/src/main/java/com/thealgorithms/sorts/MergeSortRecursive.java
+++ b/src/main/java/com/thealgorithms/sorts/MergeSortRecursive.java
@@ -34,13 +34,13 @@ public class MergeSortRecursive {
}
private static List sort(List unsortedA, List unsortedB) {
- if (unsortedA.size() <= 0 && unsortedB.size() <= 0) {
+ if (unsortedA.isEmpty() && unsortedB.isEmpty()) {
return new ArrayList<>();
}
- if (unsortedA.size() <= 0) {
+ if (unsortedA.isEmpty()) {
return unsortedB;
}
- if (unsortedB.size() <= 0) {
+ if (unsortedB.isEmpty()) {
return unsortedA;
}
if (unsortedA.get(0) <= unsortedB.get(0)) {