private double calculateClosestBruteForce(Point[] sortedByX) {
        double minDistance = Double.MAX_VALUE;
        for (int i = 0; i < sortedByX.length; i++) {
            for (int j = 1; j < sortedByX.length; j++) {
                //we don't want to calculate distance between the same point
                if (i != j) {
                    double distance = getDistance(sortedByX[i], sortedByX[j]);
                    if (distance < minDistance) {
                        minDistance = distance;
                        closest = sortedByX[i] + " - " + sortedByX[j];
                    }
                }
            }
        }
        return minDistance;
    }