Goldman Sachs Interview Question

write a code to find a subset in an array which has the maximum sum. Array can have both negative and positive numbers.