Topic: Dynamic Programming Problem / Level: beginner

Problem: Find the longest zigzag subsequence in an array.

Run the code to see the output here...