diff --git a/src/main/java/com/thealgorithms/datastructures/trees/KDTree.java b/src/main/java/com/thealgorithms/datastructures/trees/KDTree.java index cdcbafa5..e5528c39 100644 --- a/src/main/java/com/thealgorithms/datastructures/trees/KDTree.java +++ b/src/main/java/com/thealgorithms/datastructures/trees/KDTree.java @@ -75,7 +75,6 @@ public class KDTree { @Override public boolean equals(Object obj) { if (obj instanceof Point other) { - if (other.getDimension() != this.getDimension()) return false; return Arrays.equals(other.coordinates, this.coordinates); } return false;