Skip to content

Commit e34cde8

Browse files
committed
Fixed styling bugs
1 parent 2917774 commit e34cde8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main/java/com/thealgorithms/bitmanipulation/BitwiseGCD.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
public final class BitwiseGCD {
2626

2727
private BitwiseGCD() {
28-
2928
}
3029

3130
/**
@@ -106,15 +105,16 @@ private static long absOrThrowIfOverflow(long x) {
106105
* will be thrown.
107106
*/
108107
public static long gcd(long... values) {
109-
if (values == null || values.length == 0) {
108+
109+
if (values == null || values.length == 0) {
110110
return 0L;
111111
}
112112
long result = values[0];
113113
for (int i = 1; i < values.length; i++) {
114114
result = gcd(result, values[i]);
115-
if (result == 1L) {
115+
if (result == 1L) {
116116
return 1L; // early exit
117-
}
117+
}
118118
}
119119
return result;
120120
}
@@ -128,7 +128,8 @@ public static long gcd(long... values) {
128128
* @return non-negative gcd as a {@link BigInteger}
129129
*/
130130
public static BigInteger gcdBig(BigInteger a, BigInteger b) {
131-
if (a == null || b == null) {
131+
132+
if (a == null || b == null) {
132133
throw new NullPointerException("Arguments must not be null");
133134
}
134135
return a.abs().gcd(b.abs());

0 commit comments

Comments
 (0)