Skip to content

Commit bbef89c

Browse files
authored
refactor: simplify logic of Point::equals in KDTree (#5158)
1 parent 5703be5 commit bbef89c

File tree

1 file changed

+0
-1
lines changed
  • src/main/java/com/thealgorithms/datastructures/trees

1 file changed

+0
-1
lines changed

src/main/java/com/thealgorithms/datastructures/trees/KDTree.java

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public int getDimension() {
7575
@Override
7676
public boolean equals(Object obj) {
7777
if (obj instanceof Point other) {
78-
if (other.getDimension() != this.getDimension()) return false;
7978
return Arrays.equals(other.coordinates, this.coordinates);
8079
}
8180
return false;

0 commit comments

Comments
 (0)