Snippets tagged equilibrium index

  • An equilibrium list

    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 people like this

    Posted: 4 years ago by Joel Huang