Maximum Alternating Subsequence Sum
Given an array nums of integers, find the maximum alternating subsequence sum. An alternating subsequence is a subsequence in which the elements are in strictly increasing or strictly decreasing order. The alternating sum of a subsequence is the sum of the elements at even indices minus the sum of the elements at odd indices.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)