Maximum Alternating Subsequence Sum Leetcode Python Basic Programs