Longest Alternating-Parity Zigzag Subsequence With a Minimum Step

Company: INFOSYS

Difficulty: medium