You are viewing a single comment's thread. Return to all comments →
def balancedSums(arr): total_sum = sum(arr) left_sum = 0 for num in arr: total_sum -= num if left_sum == total_sum: return 'YES' left_sum += num 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 →