




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Create an array sumLeft where sumLeft[i] is the sum of all the numbers to the left of index i.
Create an array sumRight where sumRight[i] is the sum of all the numbers to the right of index i.
For each index i, check if sumLeft[i] equals sumRight[i]. If so, return i. If no such i is found, return -1.