Ad
  • Default User Avatar

    Finally found the problem. Hint: look how your algorithm behaves with a problematic input outside of codewars environment...

  • Default User Avatar

    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.