Checking possible prefix subarrays . If sum of them is less than or equal to zero , then return 1
for i in range ( n ) : NEW_LINE INDENT sum += arr [ i ] ; NEW_LINE if ( sum <= 0 ) : NEW_LINE INDENT return True ; NEW_LINE DEDENT DEDENT