1 people like it.
Like the snippet!
An equilibrium index of this array is any integer P such that 0 ≤ P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices. The following is an implementation of such equilibrium list (given the input is a list).
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
|Posted:||10 years ago|
|Tags:||equilibrium index , list|