mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-24 04:54:21 +08:00
style: enabled InnerAssignment
in checkstyle (#5162)
* style: enabled InnerAssignment in checkstyle * Refactor code formatting in KnapsackMemoization.java and UnionFind.java * style: remove redundant blank line * style: mark `includeCurrentItem` and `excludeCurrentItem` as `final` * style: remove `KnapsackMemoization` from `pmd-exclude.properties` * style: use `final` --------- Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
f8e62fbb90
commit
0f42e995a4
@ -19,7 +19,8 @@ public final class SieveOfEratosthenes {
|
||||
checkInput(n);
|
||||
Type[] isPrimeArray = new Type[n + 1];
|
||||
Arrays.fill(isPrimeArray, Type.PRIME);
|
||||
isPrimeArray[0] = isPrimeArray[1] = Type.NOT_PRIME;
|
||||
isPrimeArray[0] = Type.NOT_PRIME;
|
||||
isPrimeArray[1] = Type.NOT_PRIME;
|
||||
|
||||
double cap = Math.sqrt(n);
|
||||
for (int i = 2; i <= cap; i++) {
|
||||
|
Reference in New Issue
Block a user