Topic: Dynamic Programming Problem / Level: intermediate

Problem: Find the longest alternating subsequence in an array where adjacent elements alternate between even and odd values using dynamic programming.

Run the code to see the output here...