Push the prefix sum1 of the array arr [ ] in prefix [ ]
for i in range ( N ) : NEW_LINE INDENT sum1 += arr [ i ] NEW_LINE v . append ( sum1 ) NEW_LINE DEDENT l = 0 NEW_LINE ans = 0 NEW_LINE r = 0 NEW_LINE for i in range ( len ( v ) ) : NEW_LINE