Balance point of a list
Given a list of integers nums, return the smallest index i where the sum of the values strictly to the left of i equals the sum of the values strictly to its right. An empty side sums to 0. Return -1 if no index balances the list.
Values may be negative and nums may be empty. Aim for O(n): don't add up both sides again for every index.
Besides the tests, one large input (12,000 numbers) with a ~150 ms limit (scaled to your device's speed): brute force won't pass.
Examples
balance_index([3,1,5,2,2])→2balance_index([2,5,4])→-1balance_index([3,4,-4])→0