You are viewing a single comment's thread. Return to all comments →
This won't need any condition checking
def balancedSums(arr): s = sum(arr) left = 0 for i in arr: left+=i if left ==s+i-left: return 'YES' 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 →
This won't need any condition checking