You are viewing a single comment's thread. Return to all comments →
Python solution
def balancedSums(arr): sums = sum(arr) leftSum = 0 for i in arr: if sums-i == leftSum: return "YES" else: sums -= i leftSum += 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 →
Python solution