Topic: Dynamic Programming Problem / Level: beginner

Problem: Find the longest subsequence in an array where adjacent elements alternately increase and decrease using dynamic programming.

Run the code to see the output here...