
EQUILIBRIUM INDEX IN ARRAY in Python

The Equilibrium Index of an array is an index where the sum of the elements on the left side of the index is equal to the sum of the elements on the right side.def find_equilibrium_index(arr): total_sum = sum(arr) ...