Skip to content

Commit 363a7b2

Browse files
committed
Added Goldbach's Conjecture algorithm.
1 parent d05ade3 commit 363a7b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ private static boolean isPrime(int n) {
2424
int i;
2525
if (n <= 1 || (n % 2 == 0 && n != 2)) {
2626
return false;
27-
}
28-
else {
27+
} else {
2928
for (i = 3; i < Math.sqrt(n); i += 2) {
3029
if (n % i == 0) {
3130
return false;

0 commit comments

Comments
 (0)