Max Sum Array Leetcode Problems Python