You are viewing a single comment's thread. Return to all comments →
def balancedSums(arr): leftArray = 0 rightArray = sum(arr[:len(arr)]) for i in range(len(arr)): rightArray -= arr[i] if leftArray == rightArray: return "YES" leftArray += arr[i] return "NO"
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Array
You are viewing a single comment's thread. Return to all comments →