Alternating Subsequence Maximum

Company: Infosys_

Difficulty: medium