Equilibrium index: Difference between revisions
m
→Python :: In terms of itertools.accumulate
m (→Python :: In terms of itertools.accumulate: Tidied.) |
|||
Line 2,099:
def equilibriumIndices(xs):
'''List indices at which the sum of values to the left
equals the sum of values to the right.
'''
def go(xs):
'''Left scan from accumulate,
|