We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b569eba commit 9b9274cCopy full SHA for 9b9274c
src/test/java/com/thealgorithms/divideandconquer/ClosestPairTest.java
@@ -40,7 +40,7 @@ public void testXPartition() {
40
41
int pivotIndex = cp.xPartition(points, 0, 4);
42
assertEquals(2, pivotIndex); // After partition, pivot should be at index 2
43
- assertEquals(1.0, points[0].x);
+ assertEquals(2.0, points[0].x);
44
assertEquals(2.0, points[1].x);
45
assertEquals(3.0, points[2].x);
46
assertEquals(4.0, points[3].x);
@@ -59,7 +59,7 @@ public void testYPartition() {
59
points[4] = cp.buildLocation(3.0, 2.0);
60
61
int pivotIndex = cp.yPartition(points, 0, 4);
62
- assertEquals(3, pivotIndex); // After partition, pivot should be at index 3
+ assertEquals(1, pivotIndex); // After partition, pivot should be at index 1
63
assertEquals(1.0, points[1].y);
64
assertEquals(2.0, points[4].y);
65
assertEquals(3.0, points[0].y);
0 commit comments