We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Exactly. Not only that, but a general solution would handle negatives and 0, too (which isn't specified). A single element isn't a special case, in my thinking, but rather than case where the sum of the left and the sum of the right of the single element are equal (0). shrug
Cookie support is required to access HackerRank
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 →
Exactly. Not only that, but a general solution would handle negatives and 0, too (which isn't specified). A single element isn't a special case, in my thinking, but rather than case where the sum of the left and the sum of the right of the single element are equal (0). shrug