File tree 1 file changed +9
-4
lines changed
src/main/java/com/thealgorithms/divideandconquer
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 18
18
* 2. Recursive (Divide-and-Conquer) Method
19
19
*/
20
20
class Point implements Comparable <Point > {
21
- double x , y ;
21
+ double x ;
22
+ double y ;
22
23
23
24
/**
24
25
* Constructor to initialize a point with x and y coordinates.
25
26
*
26
27
* @param x The x-coordinate of the point.
27
28
* @param y The y-coordinate of the point.
28
29
*/
29
- public Point (double x , double y ) {
30
+ Point (double x , double y ) {
30
31
this .x = x ;
31
32
this .y = y ;
32
33
}
@@ -55,7 +56,9 @@ public int compareTo(Point other) {
55
56
*/
56
57
@ Override
57
58
public boolean equals (Object obj ) {
58
- if (!(obj instanceof Point )) return false ;
59
+ if (!(obj instanceof Point )) {
60
+ return false ;
61
+ }
59
62
Point other = (Point ) obj ;
60
63
return this .x == other .x && this .y == other .y ;
61
64
}
@@ -86,7 +89,9 @@ public String toString() {
86
89
* 1. Brute-force method
87
90
* 2. Recursive (divide-and-conquer) method
88
91
*/
89
- public class ConvexHull {
92
+ public final class ConvexHull {
93
+ private ConvexHull () {
94
+ }
90
95
91
96
/**
92
97
* Computes the determinant of three points to determine their orientation.
You can’t perform that action at this time.
0 commit comments