Skip to content

Commit c7d1432

Browse files
committed
Fixed build errors
1 parent 56ddb52 commit c7d1432

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/thealgorithms/randomized/ClosestPair.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package com.thealgorithms.randomized;
22
import java.math.BigDecimal;
33
import java.math.RoundingMode;
4-
import java.util.*;
4+
import java.util.ArrayList;
5+
import java.util.Collections;
6+
import java.util.Comparator;
7+
import java.util.List;
58

69
// As required by Repository, new algorithms have URL in comments with explanation
710
// https://www.geeksforgeeks.org/closest-pair-of-points-using-divide-and-conquer-algorithm
@@ -47,7 +50,9 @@ public static double closest(List<Point> points) {
4750

4851
private static double closestRecursiveHelper(List<Point> points, int left, int right) {
4952
// Base Case occurs with 3 or fewer points
50-
if (right - left <= 2) return baseCase(points, left, right);
53+
if (right - left <= 2) {
54+
return baseCase(points, left, right);
55+
}
5156

5257
// Divide and conquer
5358
int mid = (left + right) / 2;

0 commit comments

Comments
 (0)