Skip to content

Commit 785d80d

Browse files
committed
Fixed a bug
1 parent 7fabeb3 commit 785d80d

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

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

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public final class BitwiseGCD {
2626

27-
private BitwiseGCD() {}
27+
private BitwiseGCD() { }
2828

2929
/**
3030
* Computes GCD of two long values using Stein's algorithm (binary GCD).
@@ -140,17 +140,5 @@ public static BigInteger gcdBig(long a, long b) {
140140
public static int gcd(int a, int b) {
141141
return (int) gcd((long) a, (long) b);
142142
}
143-
144-
/**
145-
* Demo main method. Remove in production; kept for ad-hoc running.
146-
*/
147-
public static void main(String[] args) {
148-
System.out.println("gcd(48, 18) = " + gcd(48L, 18L));
149-
System.out.println("gcd(0, 5) = " + gcd(0L, 5L));
150-
System.out.println("gcd(270, 192) = " + gcd(270L, 192L));
151-
152-
// BigInteger example with Long.MIN_VALUE
153-
BigInteger g = gcdBig(Long.MIN_VALUE, 0L);
154-
System.out.println("gcdBig(Long.MIN_VALUE, 0) = " + g); // prints 2^63
155-
}
143+
156144
}

0 commit comments

Comments
 (0)