Skip to content

Commit c78dd46

Browse files
committed
gcd function reformatted
1 parent 64cd545 commit c78dd46

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/thealgorithms/slidingwindow/ShortestCoprimeSegment.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ private static boolean legalSegment(DoubleStack front, DoubleStack back) {
5959
private static long gcd(long a, long b) {
6060
if (a < b) {
6161
return gcd(b, a);
62-
}
63-
else if (b == 0) {
62+
} else if (b == 0) {
6463
return a;
65-
}
66-
else {
64+
} else {
6765
return gcd(a % b, b);
6866
}
6967
}

0 commit comments

Comments
 (0)