You are viewing a single comment's thread. Return to all comments →
what if there are only two elements in the array?
In that case answer would be NO no matter what the number is.
leftsum = 0 and rightsum = 5
leftsum = 4 and rightsum = 0
(also note that Ai>=1)