Topic: Dynamic Programming Problem / Level: intermediate

Problem: Solve the "Longest Subarray with Alternating Positive and Negative Elements" problem where you find the longest subarray with alternating signs using dynamic programming.

Run the code to see the output here...