Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Finally found the problem. Hint: look how your algorithm behaves with a problematic input outside of codewars environment...
Is there any problem with this Kata in Python? In a random test case, I have the following array: [26, 9, -10, 6, 13, 22, 20, -22, -27, -13, -18, 4, -13, -4, 18, -11, 19, -26, -23, -30, 15, -13, -19, 7, -25, -2, 0, 27, 23, -11, 1, 9, -19, -20, -21, -7, -28, 7, -11, -24, 0, 22, 2, 21, 28, 27, -15, -4, -6, -19] for which the expected value is 1171 and my answer is 100. Note that the sum of absolute values is 741.