My challenge is to find an element of the array such that the sum of all elements to the left is equal to the sum of all elements to the right. Example arr=[5,6,8,11] 8 is between two subarrays that sum to 11.
function balancedSums(arr) {
}
balancedSums([1,2,3,3])
I think the function below do the job, it returns the index of the element you are looking for :
If you have any question about this code, you can ask me in comments ;)