File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/main/java/com/thealgorithms/others Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public BigInteger[] shorAlgorithm(BigInteger number) {
22
22
if (number .mod (new BigInteger ("2" )).equals (BigInteger .ZERO )) {
23
23
BigInteger p = number .divide (new BigInteger ("2" ));
24
24
BigInteger q = new BigInteger ("2" );
25
- return new BigInteger []{p , q };
25
+ return new BigInteger [] {p , q };
26
26
}
27
27
28
28
Random random = new Random ();
@@ -33,7 +33,7 @@ public BigInteger[] shorAlgorithm(BigInteger number) {
33
33
34
34
BigInteger hcf = base .gcd (number );
35
35
if (hcf .compareTo (BigInteger .ONE ) > 0 ) {
36
- return new BigInteger []{hcf , number .divide (hcf )};
36
+ return new BigInteger [] {hcf , number .divide (hcf )};
37
37
}
38
38
39
39
int result = exponent (base , number );
@@ -45,8 +45,7 @@ public BigInteger[] shorAlgorithm(BigInteger number) {
45
45
BigInteger p = congruentResult .add (BigInteger .ONE ).gcd (number );
46
46
BigInteger q = congruentResult .subtract (BigInteger .ONE ).gcd (number );
47
47
48
- if (!p .equals (BigInteger .ONE ) && !q .equals (BigInteger .ONE ))
49
- return new BigInteger []{p , q };
48
+ if (!p .equals (BigInteger .ONE ) && !q .equals (BigInteger .ONE )) return new BigInteger [] {p , q };
50
49
return null ;
51
50
}
52
51
}
You can’t perform that action at this time.
0 commit comments