Update core-java-modules/core-java-arrays-operations-advanced-2/src/main/java/com/baeldung/equilibriumindex/EquilibriumIndexFinder.java
Co-authored-by: KevinGilmore <kpg102@gmail.com>
This commit is contained in:
parent
d88aa573b0
commit
9aca65bd33
|
@ -13,7 +13,7 @@ class EquilibriumIndexFinder {
|
|||
}
|
||||
|
||||
List<Integer> equilibriumIndexes = new ArrayList<Integer>();
|
||||
for (int i=0; i<array.length; i++) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
if (partialSums[i] == (partialSums[array.length] - (partialSums[i+1]))) {
|
||||
equilibriumIndexes.add(i);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue