File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
main/java/com/thealgorithms/maths
test/java/com/thealgorithms/maths Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change 22
33import static org .junit .jupiter .api .Assertions .assertEquals ;
44import static org .junit .jupiter .api .Assertions .assertThrows ;
5-
65import java .math .BigInteger ;
7-
86import org .junit .jupiter .api .Test ;
97
108public class FactorialTest {
You can’t perform that action at this time.
0 commit comments