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
6e83e84cd6
commit
d88aa573b0
|
@ -8,7 +8,7 @@ class EquilibriumIndexFinder {
|
|||
List<Integer> findEquilibriumIndexes(int[] array) {
|
||||
int[] partialSums = new int[array.length + 1];
|
||||
partialSums[0] = 0;
|
||||
for (int i=0; i<array.length; i++) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
partialSums[i+1] = partialSums[i] + array[i];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue