maximum subarray problem solved