Topic: Dynamic Programming Problem / Level: beginner

Problem: Find the longest subsequence in an array such that adjacent elements have different parity (odd/even).

Run the code to see the output here...