This basically works with dividing a into two parts with the sum of the absolute values of the two parts as close to each other as possible.
Then you want to multiply these elements by 1 or -1 to make one section negative and the other positive. As you do this, you summarize them to get the final answer.
From the point of view of the algorithm, I believe that the partition step is almost certainly NP-complete (phrases like “subset of the sum” and “partition problem” come to mind). From a programming point of view, it's pretty simple, but - exhaustively test the possibilities until you get the best. As long as the number of elements is small (up to a dozen or so [edit: since it's O (2 N ), you can probably increase it to 30-40) be fast enough.
I believe that it should be proportional to O (N!), Although if the array turns out to be big, time will quickly become unreasonable. Since you are only divided into two sets and the order inside the sets does not matter, O (2 N ) instead of O (N!). It does not grow almost as fast as O (N!), But still fast enough to make large sets unfounded for processing.
I should add, however, that Codility seems to specialize in issues that initially might seem NP-complete, but not really - if you missed out on any detail in your description, the problem could be significantly simpler.
Edit: When re-reading it, the problem may be that I ignored an important detail: a limited range. I'm not sure how you use it, but I'm sure it is important to create an effective solution. My immediate assumption is that it is based on something similar to changing a sort based on a sort (like a bucket). I did not think it out in any real detail, though ...
Edit2: When doing a little look (and prompting @Moron), a limited range is important, and my thinking about how it appears in the solution was generally correct. @Moron was kind enough to point to a Wikipedia entry for the problem of summing up a subset, but I did not find it particularly well written. With a little glance at the Cornell explanation document, I found it a bit cleaner / clearer.