Skip to content

Commit 1b31a2f

Browse files
committed
chore: final formatting and test fix for BigInteger
1 parent 41789a3 commit 1b31a2f

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/main/java/com/thealgorithms/maths/Factorial.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ public final class Factorial {
66
private Factorial() {
77
}
88

9-
/**
10-
* Calculate factorial N using iteration
11-
*
12-
* @param n the number
13-
* @return the factorial of {@code n}
14-
*/
159
public static BigInteger factorial(int n) {
1610
if (n < 0) {
1711
throw new IllegalArgumentException("Input number cannot be negative");
@@ -22,4 +16,4 @@ public static BigInteger factorial(int n) {
2216
}
2317
return result;
2418
}
25-
}
19+
}

src/test/java/com/thealgorithms/maths/FactorialTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import static org.junit.jupiter.api.Assertions.assertEquals;
44
import static org.junit.jupiter.api.Assertions.assertThrows;
5-
65
import java.math.BigInteger;
7-
86
import org.junit.jupiter.api.Test;
97

108
public class FactorialTest {

0 commit comments

Comments
 (0)