The alternating sum of an array indexed from
For instance, the alternating sum of an array
Given an integer array nums, return the maximum possible alternating sum of any subsequence of nums after indexing the chosen subsequence starting from
A subsequence of an array is a sequence obtained by deleting some (possibly zero) elements from the original array without altering the relative order of the remaining elements.
Constraints:
nums.length
nums[i]
The alternating sum of an array indexed from
For instance, the alternating sum of an array
Given an integer array nums, return the maximum possible alternating sum of any subsequence of nums after indexing the chosen subsequence starting from
A subsequence of an array is a sequence obtained by deleting some (possibly zero) elements from the original array without altering the relative order of the remaining elements.
Constraints:
nums.length
nums[i]